string formatting with mapping & '*'... is this a bug?
Jeff Epler
jepler at unpythonic.net
Fri Sep 10 12:41:23 EDT 2004
> On Fri, 10 Sep 2004 10:42:08 -0500 Jeff wrote:
>
> > In the case of Python, this would become
> > print "%(width)*(num)d" % {'width': width, 'num': num}
>
On Fri, Sep 10, 2004 at 12:01:40PM -0400, Pierre Fortin wrote:
> If this did change, I'd prefer:
> print "%(num)*(width)d" % {'width': width, 'num': num}
> ^^^ ^^^^^
> in keeping with "in this order" (PyEssenRef 2nd ed. - P.47)
I think I got my Python example wrong. Either way, I think it should
match the SuS printf extension behavior, but with dict keys instead of
numeric indices.
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20040910/4521182a/attachment.sig>
More information about the Python-list
mailing list