@@ -22,19 +22,19 @@ The :mod:`locale` module defines the following exception and functions:
2222
2323.. exception :: Error
2424
25- Exception raised when :func: `setlocale ` fails.
25+ Exception raised when the locale passed to :func: `setlocale ` is not
26+ recognized.
2627
2728
2829.. function :: setlocale(category, locale=None)
2930
30- If *locale * is specified, it may be a string, a tuple of the form ``(language
31- code, encoding) ``, or ``None ``. If it is a tuple, it is converted to a string
32- using the locale aliasing engine. If *locale * is given and not ``None ``,
33- :func: `setlocale ` modifies the locale setting for the *category *. The available
34- categories are listed in the data description below. The value is the name of a
35- locale. An empty string specifies the user's default settings. If the
36- modification of the locale fails, the exception :exc: `Error ` is raised. If
37- successful, the new locale setting is returned.
31+ If *locale * is given and not ``None ``, :func: `setlocale ` modifies the locale
32+ setting for the *category *. The available categories are listed in the data
33+ description below. *locale * may be a string, or an iterable of two strings
34+ (language code and encoding). If it's an iterable, it's converted to a locale
35+ name using the locale aliasing engine. An empty string specifies the user's
36+ default settings. If the modification of the locale fails, the exception
37+ :exc: `Error ` is raised. If successful, the new locale setting is returned.
3838
3939 If *locale * is omitted or ``None ``, the current setting for *category * is
4040 returned.
0 commit comments