A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-September/091640.html below:

[Python-Dev] Numeric alignment issue with PEP 3101

[Python-Dev] Numeric alignment issue with PEP 3101 [Python-Dev] Numeric alignment issue with PEP 3101Eric Smith eric at trueblade.com
Mon Sep 7 23:46:42 CEST 2009
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.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4