[issue13790] In str.format an incorrect error message for list, tuple, dict, set
py.user
report at bugs.python.org
Mon Jan 16 05:25:48 CET 2012
py.user <port139 at yandex.ru> added the comment:
R. David Murray wrote:
> Putting nothing between the {}'s is an empty format string.
this is an empty replacement field
here:
http://docs.python.org/py3k/library/string.html#format-string-syntax
the definition of format string:
"Format strings contain “replacement fields” surrounded by curly braces {}. Anything that is not contained in braces is considered literal text, which is copied unchanged to the output."
"The grammar for a replacement field is as follows:"
replacement_field ::= "{" [field_name] ["!" conversion] [":" format_spec] "}"
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13790>
_______________________________________
More information about the Python-bugs-list
mailing list