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

Guido van Rossum guido at python.org
Thu Mar 12 19:42:21 CET 2009


Raymond, aren't you equating "local" with the US?

The local module lets you take the locale as a separate parameter. I
agree we should not try to duplicate it (though it's a bad API since
it relies on global state -- that doesn't work very well in
multi-threaded or web apps).

But it does make sense for an accountant in France or Holland to
hardcode her desire for a decimal comma and thousand-separating
periods, as otherwise their boss won't be able to interpret the
output.

On Thu, Mar 12, 2009 at 11:28 AM, Raymond Hettinger <python at rcn.com> wrote:
>
> [Bruce Leban]
>>
>> If I'm French then all decimal points should be ',' not '.' regardless
>> of what language the developer speaks, right?
>
> We already have a locale aware solution and that should
> be used for internationalized apps.  The locale module
> is not going away.
>
> This proposal is for everyday programs for local consumption
> (most scripts never get internationalized).  I would even
> venture that most Python scripts are not written by
> professional programmers.  If an accountant needs to knock-out
> a quick report, he/she should have a simple means of basic formatting
> without invoking all of the locale machinery.
>
>
> Raymond
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>



-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-ideas mailing list