Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-06-30 14:41:33


While we're exploring that path, we could get even more Pythonic:

  format(" $1 $2 $3") % tuple(x, y z))

or, heck, fully pythonic:

  " $1 $2 $3" % tuple(x, y z)

or, less Pythonically:

   format(" $1 $2 $3", tuple(x, y, z));

At least these keep all the combinatorics in one place (tuple).
Incidentally, until we get a core language way to remove the combinatorics,
I like the repeated '%' operator.

-Dave
----- Original Message -----
From: "Aleksey Gurtovoy" <alexy_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, June 30, 2001 3:00 PM
Subject: RE: [boost] Review : format2, yet another 'printf class'

> Samuel Krempp wrote:
> > cout << format(" $1 $2 $3", x, y, z) << endl;
> > cout << format(" $1 $2 $3") %x %y %z << endl;
>
> Or may be this?
>
> cout << format(" $1 $2 $3")(x)(y)(z) << endl;
>
> Just a thought.
>
>
> Aleksey
>
> Info: http://www.boost.org Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk