[issue13598] string.Formatter doesn't support empty curly braces "{}"

Phil Elson report at bugs.python.org
Wed Oct 31 13:08:19 CET 2012


Phil Elson added the comment:

The current patch fails to catch the fact that auto vs manual numbering has been used in following corner case:

from string import Formatter
print(Formatter().format("{0:{}}", 'foo', 5))


To fix this, without adding state to the formatter instance, some more information is going to need to be passed to the _vformat method.

----------

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


More information about the Python-bugs-list mailing list