Issue 8691: Doc: left alignment is not the default for numbers (original) (raw)

Created on 2010-05-11 20:21 by terry.reedy, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py3k-8691.diff westley.martinez,2011-02-06 05:17
Messages (6)
msg105536 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-05-11 20:21
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.
msg106262 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-05-21 20:39
Eric should know the exact semantics best.
msg128041 - (view) Author: Westley Martínez (westley.martinez) * Date: 2011-02-06 05:17
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.
msg128059 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-02-06 14:30
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
msg128069 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-02-06 17:40
Or to Doc/ACKS.txt, which I’ve recently discovered.
msg128108 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-02-07 12:15
Fixed in r88365.
History
Date User Action Args
2022-04-11 14:57:00 admin set github: 52937
2011-02-07 12:15:41 georg.brandl set status: open -> closedmessages: + resolution: fixednosy:georg.brandl, terry.reedy, eric.smith, eric.araujo, docs@python, westley.martinez
2011-02-06 17:40:29 eric.araujo set nosy: + eric.araujomessages: +
2011-02-06 14:30:03 terry.reedy set nosy:georg.brandl, terry.reedy, eric.smith, docs@python, westley.martinezmessages: + versions: - Python 2.6
2011-02-06 05:17:09 westley.martinez set files: + py3k-8691.diffnosy: + westley.martinezmessages: + keywords: + patch
2010-05-21 20:39:54 georg.brandl set assignee: docs@python -> eric.smithmessages: + nosy: + eric.smith, georg.brandl
2010-05-11 20:21:16 terry.reedy create