[docs] [issue3067] setlocale error message is confusing

Terry J. Reedy report at bugs.python.org
Sat Nov 5 01:19:22 CET 2011


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Yes. I think in locale.rst (assuming that is the name)
'''
exception locale.Error 
Exception raised when setlocale() fails.

locale.setlocale(category, locale=None) 
If *locale* is specified, it may be a string, a tuple of the form (language code, encoding), or None. If it is a tuple, it is converted to a string using the locale aliasing engine.
'''
should be changed to
'''
exception locale.Error 
Exception raised when the locale passed to setlocale() is not recognized.

locale.setlocale(category, locale=None) 
If *locale* is specified, it may be a None, a string, or an iterable of two strings, language code and encoding. String pairs are converted to a single string using the locale aliasing engine.
'''
where language code and encoding are gray shaded as they are now.

----------
assignee:  -> docs at python
components: +Documentation -Library (Lib), Unicode
nosy: +docs at python
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3067>
_______________________________________


More information about the docs mailing list