[Python-Dev] PEP 292, Simpler String Substitutions

Tim Peters tim.one@comcast.net
Wed, 19 Jun 2002 21:39:35 -0400

[Delaney, Timothy]
> Fair enough. I couldn't off the top of my head think of an ambiguous case,

The difficulty is that a blank is a kosher flag modifier in C formats.  So,

    'goofy%(name) dogs'

is a legitimate Python format as is, and

>>> print 'goofy%(name) dogs' % {'name': 666}
goofy 666ogs

works correctly.

Why *Python* follows these goofy rules in all respects is a question we
don't ask <wink>.