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

R. David Murray rdmurray at bitdance.com
Mon Mar 16 17:48:50 CET 2009


Chris Rebert <pyideas at rebertia.com> wrote:
> On Mon, Mar 16, 2009 at 7:10 AM, spir <denis.spir at free.fr> wrote:
> > Le Sun, 15 Mar 2009 15:34:54 -0700,
> > Chris Rebert <pyideas at rebertia.com> s'exprima ainsi:
> >
> >> commas are apparently the international /financial/
> >> standard
> >
> > Certainly not! I am very surprised to read that. Do you mean the standard in english-speaking countries? Or in countries which currency is $ or £?
> >
> > see http://en.wikipedia.org/wiki/Decimal_point#Examples_of_use
> 
> Yes, I know it varies from nation to nation, but apparently less so
> when specifically working internationally (like you, I was surprised
> there was a standard at all); see earlier response by Raymond
> Hettinger in the parallel c.l.p thread. Relevant quote:
> 
> """
> I'm a CPA, was a 15 year division controller
> for a Fortune 500 company, and an auditor for an international
> accounting firm.  Believe me when I say it is the norm in finance.
> """
> 
> "It" referring to period-as-decimal-point and
> comma-as-thousands-separator notation.

Regardless of any standards, I find it interesting that I just now ran
into exactly the use case that prompted Raymond to propose this addition.
I need to format a one-off report for a client, and it would be _most_
helpful if I could easily tell Python to format the numbers, which are
reporting bytes transmitted, with comma thousands separators for clarity.

I guess that means I'm +1 for some form of this making it through.

--
R. David Murray           http://www.bitdance.com




More information about the Python-ideas mailing list