Issue #3067: Enhance the documentation and docstring of locale.setlocale()

This commit is contained in:
Petri Lehtinen 2011-11-05 10:18:50 +02:00
parent 49aa72ed4c
commit 416ecffcc4
3 changed files with 16 additions and 12 deletions

View file

@ -524,9 +524,10 @@ def getlocale(category=LC_CTYPE):
def setlocale(category, locale=None):
""" Set the locale for the given category. The locale can be
a string, a locale tuple (language code, encoding), or None.
a string, an iterable of two strings (language code and encoding),
or None.
Locale tuples are converted to strings the locale aliasing
Iterables are converted to strings using the locale aliasing
engine. Locale strings are passed directly to the C lib.
category may be given as one of the LC_* values.