A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-January/059567.html below:

[Python-Dev] locale and LC_NUMERIC

[Python-Dev] locale and LC_NUMERIC [Python-Dev] locale and LC_NUMERIC"Martin v. Löwis" martin at v.loewis.de
Mon Jan 9 22:56:12 CET 2006
Neal Norwitz wrote:
> neal at janus ~/build/python/svn/clean-ish $ LC_ALL=de_DE ./python
> 
>>>>import locale
>>>>locale.setlocale(locale.LC_ALL)
> 
> 'C'
> 
>>>>locale.setlocale(locale.LC_ALL, 'de_DE')
> 
> 'de_DE'
> 
> I would have expected the first call to setlocale() to return de_DE. 

No, it shouldn't. We are providing C semantics here, which is that
no locale functionality is activated unless the application explicitly
asks for it.

> Is the first call to
> setlocale() supposed to return C?  If so, always?

The return value is implementation-defined, but yes, it is supposed
to return the "C" locale (which is synonymous to the "POSIX" locale
on a POSIX system).

> I was looking for
> some way for the initial call to setlocale() to return de_DE or
> whatever other locale I set.

That shouldn't happen.

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4