classification
Title: Doc: left alignment is not the default for numbers
Type: Stage:
Components: Documentation Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.smith Nosy List: docs@python, eric.araujo, eric.smith, georg.brandl, terry.reedy, westley.martinez
Priority: normal Keywords: patch

Created on 2010-05-11 20:21 by terry.reedy, last changed 2011-02-07 12:15 by georg.brandl. 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
2011-02-07 12:15:41georg.brandlsetstatus: open -> closed

messages: + msg128108
resolution: fixed
nosy: georg.brandl, terry.reedy, eric.smith, eric.araujo, docs@python, westley.martinez
2011-02-06 17:40:29eric.araujosetnosy: + eric.araujo
messages: + msg128069
2011-02-06 14:30:03terry.reedysetnosy: georg.brandl, terry.reedy, eric.smith, docs@python, westley.martinez
messages: + msg128059
versions: - Python 2.6
2011-02-06 05:17:09westley.martinezsetfiles: + py3k-8691.diff

nosy: + westley.martinez
messages: + msg128041

keywords: + patch
2010-05-21 20:39:54georg.brandlsetassignee: docs@python -> eric.smith

messages: + msg106262
nosy: + eric.smith, georg.brandl
2010-05-11 20:21:16terry.reedycreate