Re: [Python-Dev] Locale-specific formatting

2010-12-20 Thread Oleg Broytman
On Mon, Dec 20, 2010 at 01:09:19AM +0100, ??ric Araujo wrote: Le 18/12/2010 16:33, Oleg Broytman a ??crit : This is quite a known problem, not specific to Python. Locale settings are global for a process, and this is one of the thousands reasons why locale is considered so horrible.

Re: [Python-Dev] Locale-specific formatting

2010-12-19 Thread Oleg Broytman
On Sat, Dec 18, 2010 at 06:21:24PM -0500, Terry Reedy wrote: On 12/18/2010 10:33 AM, Oleg Broytman wrote: This is quite a known problem, not specific to Python. Locale settings are global for a process, and this is one of the thousands reasons why locale is considered so horrible.

Re: [Python-Dev] Locale-specific formatting

2010-12-19 Thread Martin v. Löwis
I suppose there could be some sort of locale database. A downloadable, up-to-date copy of the database could be maintained on the Python website. I think you are quite underestimating the implementation effort. So -0 on your original proposal until such a thing actually exists. Regards,

Re: [Python-Dev] Locale-specific formatting

2010-12-19 Thread Éric Araujo
Le 18/12/2010 16:33, Oleg Broytman a écrit : This is quite a known problem, not specific to Python. Locale settings are global for a process, and this is one of the thousands reasons why locale is considered so horrible. ICU is perhaps the only way around the problem. Babel rocks:

Re: [Python-Dev] Locale-specific formatting

2010-12-18 Thread Martin v. Löwis
Comments? How do you implement that? In particular, how do you retrieve information for different locales in a single program? Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Locale-specific formatting

2010-12-18 Thread Oleg Broytman
On Sat, Dec 18, 2010 at 12:08:47AM +, MRAB wrote: This makes it harder to use more than one locale at a time This is quite a known problem, not specific to Python. Locale settings are global for a process, and this is one of the thousands reasons why locale is considered so horrible.

Re: [Python-Dev] Locale-specific formatting

2010-12-18 Thread MRAB
On 18/12/2010 09:26, Martin v. Löwis wrote: Comments? How do you implement that? In particular, how do you retrieve information for different locales in a single program? The locale module would be able to return a named locale dict: loc = locale.getnamedlocale('en_UK') or: loc =

Re: [Python-Dev] Locale-specific formatting

2010-12-18 Thread Terry Reedy
On 12/18/2010 10:33 AM, Oleg Broytman wrote: This is quite a known problem, not specific to Python. Locale settings are global for a process, and this is one of the thousands reasons why locale is considered so horrible. ICU is perhaps the only way around the problem. This is about

Re: [Python-Dev] Locale-specific formatting

2010-12-18 Thread MRAB
On 19/12/2010 00:31, Martin v. Löwis wrote: Am 18.12.2010 19:26, schrieb MRAB: On 18/12/2010 09:26, Martin v. Löwis wrote: Comments? How do you implement that? In particular, how do you retrieve information for different locales in a single program? The locale module would be able to

[Python-Dev] Locale-specific formatting

2010-12-17 Thread MRAB
I had a thought about locale-specific formatting. Currently, when we want to do locale-specific formatting we use the locale module like this: locale.format(%d, 12345, grouping=False) '12345' locale.format(%d, 12345, grouping=True) '12,345' This makes it harder to use more than one locale at

Re: [Python-Dev] Locale-specific formatting

2010-12-17 Thread R. David Murray
On Sat, 18 Dec 2010 00:08:47 +, MRAB pyt...@mrabarnett.plus.com wrote: I had a thought about locale-specific formatting. Currently, when we want to do locale-specific formatting we use the locale module like this: locale.format(%d, 12345, grouping=False) '12345' locale.format(%d,