[Python-ideas] Rough draft: Proposed format specifier for a thousands separator (discussion moved from python-dev)

Mark Dickinson dickinsm at gmail.com
Tue Mar 17 10:01:27 CET 2009


On Tue, Mar 17, 2009 at 3:14 AM, Guido van Rossum <guido at python.org> wrote:
> On Mon, Mar 16, 2009 at 7:33 PM, Raymond Hettinger <python at rcn.com> wrote:
>> Mark PEP 378 as accepted with Nick's original comma-only version?
>
> OK, done. Looking forward to a swift implementation!

I'll implement this for Decimal;  it shouldn't take long.

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?  That is, should format(1234, "09,d") give '00001,234'
or '0,001,234'?  The PEP specifies that format(1234, "08,d")
should give '0001,234', but that's something of a special case:
',001,234' isn't really a viable alternative.

Mark



More information about the Python-ideas mailing list