Rough draft: Proposed format specifier for a thousands separator
rhodri at wildebst.demon.co.uk
Tue Mar 17 05:11:41 CET 2009
On Tue, 17 Mar 2009 02:41:23 -0000, MRAB <google at mrabarnett.plus.com>
> Rhodri James wrote:
>> On Tue, 17 Mar 2009 01:47:32 -0000, MRAB <google at mrabarnett.plus.com>
>>> 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
Yes, but the format type 'n' is currently defined as taking its cues
from the global locale, so in that sense format already is
Rhodri James *-* Wildebeeste Herder to the Masses
More information about the Python-list