[issue8691] Doc: left alignment is not the default for numbers

New submission from Terry J. Reedy <tjreedy@udel.edu>: As reported on python-list by Alan G Isaac, Lib Ref 6.1.3.1. 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 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8691> _______________________________________

Georg Brandl <georg@python.org> added the comment: Eric should know the exact semantics best. ---------- assignee: docs@python -> eric.smith nosy: +eric.smith, georg.brandl _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8691> _______________________________________

Westley Martínez <anikom15@gmail.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 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8691> _______________________________________

Terry J. Reedy <tjreedy@udel.edu> 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 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8691> _______________________________________

Éric Araujo <merwok@netwok.org> added the comment: Or to Doc/ACKS.txt, which I’ve recently discovered. ---------- nosy: +eric.araujo _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8691> _______________________________________

Georg Brandl <georg@python.org> added the comment: Fixed in r88365. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8691> _______________________________________

Georg Brandl <georg@python.org> added the comment: Eric should know the exact semantics best. ---------- assignee: docs@python -> eric.smith nosy: +eric.smith, georg.brandl _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8691> _______________________________________

Westley Martínez <anikom15@gmail.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 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8691> _______________________________________

Terry J. Reedy <tjreedy@udel.edu> 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 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8691> _______________________________________

Éric Araujo <merwok@netwok.org> added the comment: Or to Doc/ACKS.txt, which I’ve recently discovered. ---------- nosy: +eric.araujo _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8691> _______________________________________

Georg Brandl <georg@python.org> added the comment: Fixed in r88365. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8691> _______________________________________
participants (4)
-
Georg Brandl
-
Terry J. Reedy
-
Westley Martínez
-
Éric Araujo