New submission from Ville Skyttä <[email protected]>:
The default list of locale.getdefaultlocale() is documented to be the
one of GNU gettext; in the source docs in Python 2.7 trunk:
"envvars defaults to the search path used in GNU gettext; it must
always contain the variable name 'LANG'."
...and at http://docs.python.org/dev/library/locale.html in addition to
that:
"The GNU gettext search path contains 'LANGUAGE', 'LC_ALL',
'LC_CTYPE', and 'LANG', in that order."
This is correct, cf.
http://www.gnu.org/software/gettext/manual/gettext.html#Locale-Environment-Variables
However, the code in locale.py does not match the documentation; the
patch in issue #1166948 (svn r39572) moved LANGUAGE to the end of the
list. I suggest putting it back at the beginning as documented (the
other change in r39572 is ok).
The py3k branch appears to have the same problem.
----------
components: Library (Lib)
messages: 93048
nosy: scop
severity: normal
status: open
title: locale.getdefaultlocale() envvars default code and documentation mismatch
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue6981>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com