[issue12726] explain that locale.getlocale() does not read system's locales

2020-11-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: locale.getlocale(category=LC_CTYPE) Returns the current setting for the given locale category as sequence containing language code, encoding. category may be one of the LC_* values except LC_ALL. It defaults to LC_CTYPE. Except for the code 'C', the

[issue12726] explain that locale.getlocale() does not read system's locales

2020-11-16 Thread Eryk Sun
Eryk Sun added the comment: > I tried "import locale; locale.getlocale()" on macOS and > windows (3.10) and linux (3.7) and in all cases I got > non-None values. In Windows, starting with Python 3.8, Python sets the LC_CTYPE locale to the user (not system) default locale instead of the CR

[issue12726] explain that locale.getlocale() does not read system's locales

2020-11-16 Thread Irit Katriel
Irit Katriel added the comment: I tried "import locale; locale.getlocale()" on macOS and windows (3.10) and linux (3.7) and in all cases I got non-None values. Can we close this as out of date? -- nosy: +iritkatriel status: open -> pending ___ Py

[issue12726] explain that locale.getlocale() does not read system's locales

2011-08-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Our docs explain behavior without, generally, explaining why. Hence the title change. 'Returns the current setting for the given locale category' seems pretty clear that it returns the current program setting rather than the default system setting. However,