[issue12014] str.format parses replacement field incorrectly

Eric V. Smith report at bugs.python.org
Fri May 6 19:23:44 CEST 2011


Eric V. Smith <eric at trueblade.com> added the comment:

> but makes me think that treating "!" and ":" in the index field separately is definitely wrong.

But it doesn't know they're in an index field when it's doing the parsing for ':' or '!'.

It might be possible to change this so that the field name is fully parsed first, but I'm not sure the benefit would justify the effort. What's your use case where you need this feature?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12014>
_______________________________________


More information about the Python-bugs-list mailing list