I concur. Numbers are naturally right aligned.
On Sep 7, 2009, at 2:46 PM, Eric Smith wrote:
The default string formatting alignment for all types, according to
PEP 3101, is left aligned. Issue 6857 (http://bugs.python.org/issue6857
) points out that for numeric types (int, float, and decimal, at
least), the actual implemented default alignment is right aligned.
Mark Dickinson and I agree that for numeric types, right alignment
makes much more sense as a default. And that's what %-formatting and
str.format() both do.
I think the PEP should be modified to say that right alignment is
the default for numeric types. Also the documentation at http://docs.python.org/library/string.html#formatstrings
should have the same modification.
Does anyone disagree?
Eric.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python%40rcn.com
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com