[docs] [issue9780] fill character cannot be '{'

Florent Xicluna report at bugs.python.org
Mon Sep 6 03:21:30 CEST 2010

Florent Xicluna <florent.xicluna at gmail.com> added the comment:

The PEP 3101 does not prohibit any character for the 'fill' argument.

Another example which just works:

>>> '{:{fill}^6}'.format(42, fill='{')

>>> '{:{fill}^6}'.format(42, fill='}')

I don't care if '{' and '}' are prohibited when using simple formatting syntax.  This is not a common use case, and there are workarounds (either using format() builtin or the recursive formatting).

A documentation fix could be enough.


Python tracker <report at bugs.python.org>

More information about the docs mailing list