[issue5237] Allow auto-numbered replacement fields in str.format() strings
Eric Smith
report at bugs.python.org
Fri Feb 13 17:25:58 CET 2009
Eric Smith <eric at trueblade.com> added the comment:
Right. The colon would be required if there's a format specifier. Or an
exclamation if there's just a conversion specifier:
"{!r}{:f}{!s:^10}".format('foo', 3, 10)
would give:
"'foo'3.000000 10 "
I've attached a new version that includes format specifiers.
Added file: http://bugs.python.org/file13073/auto_number_formatter_1.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5237>
_______________________________________
More information about the Python-bugs-list
mailing list