New submission from Terry J. Reedy email@example.com:
As reported on python-list by Alan G Isaac, Lib Ref 126.96.36.199. Format Specification Mini-Language, for instance http://docs.python.org/dev/py3k/library/string.html#formatstrings
wrongly says in the alignment section
"'<' Forces the field to be left-aligned within the available space (This is the default.)"
This latter, of course, is not true for number fields.
"(This is the default.)" could be replaced by "(the string default)." (in any case, the '.' should be outside the () unless one is added after 'space' before '(') and "(the number default)" added to the next line. Or instead the issue of defaults could be addressed in the text below the table.
I am assuming that this issue affects 2.6/7.
---------- assignee: docs@python components: Documentation messages: 105536 nosy: docs@python, tjreedy priority: normal severity: normal status: open title: Doc: left alignment is not the default for numbers versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Georg Brandl firstname.lastname@example.org added the comment:
Eric should know the exact semantics best.
---------- assignee: docs@python -> eric.smith nosy: +eric.smith, georg.brandl
Westley Martínez email@example.com added the comment:
It seems > is only the default for numbers. < is the default for strings, lists, sets, dicts, etc. I have made a patch, though Eric knows the exact semantics.
I wonder what the rationale for having numbers use < is.
---------- keywords: +patch nosy: +anikom15 Added file: http://bugs.python.org/file20694/py3k-8691.diff
Terry J. Reedy firstname.lastname@example.org added the comment:
Georg & Eric, I believe this simple patch is correct, and should go in 3.2.
Westley, thanks for the patch. Numbers are right-aligned because that is the traditional default.
The committer should add Westley Martinez to misc/ACKS
---------- versions: -Python 2.6