[Python-ideas] Rough draft: Proposed format specifier for a thousands separator (discussion moved from python-dev)
Raymond Hettinger
python at rcn.com
Tue Mar 17 10:50:28 CET 2009
[Mark]
> One question from the PEP, which I've been too slow to read until
> this morning: should commas appear in the zero-filled part of a
> number?
I think it should. That lets all the commas and decimals line up vertically.
Anything else would look weird.
>>> for n in seq:
... print format(n, "09,d")
1,234,567
0,000,001
0,255,989
Raymond
More information about the Python-ideas
mailing list