Rough draft: Proposed format specifier for a thousands separator

MRAB google at mrabarnett.plus.com
Mon Mar 16 22:41:23 EDT 2009


Rhodri James wrote:
> On Tue, 17 Mar 2009 01:47:32 -0000, MRAB <google at mrabarnett.plus.com> 
> wrote:
> 
>> I'm not against putting a comma in the format to indicate that grouping
>> should be used just as a dot indicates that a decimal point should be
>> used. The locale would say what characters would be used for them.
>>
>> I would prefer the format to have a fixed default so that if you don't
>> specify the locale the result is predictable.
> 
> Shouldn't that be the global locale?
> 
Other parts of the language, such as str.upper, aren't locale-sensitive,
so I think that format shouldn't be either. If you want it to be
locale-sensitive, then specify the locale, even if it's the system
locale.



More information about the Python-list mailing list