[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

Stefan Krah report at bugs.python.org
Thu Jan 19 00:04:05 CET 2012


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

py.user: The format string must always match the grammar, which is just
above the paragraph that you quoted: 

   [[fill]align][sign][#][0][width][,][.precision][type]


Thus, if fill and align are absent, it does not mean that you can add
arbitrary characters like "xx".



I think the docs are crystal clear; I also prefer Eric's suggestion
for a new error message.

----------
nosy: +skrah

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


More information about the Python-bugs-list mailing list