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
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
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
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,