mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
Revert d370d609d09b as requested by Terry Jan Reedy:
"#3067: locale.setlocale() accepts a Unicode locale."
This commit is contained in:
parent
f64a0cffca
commit
ecb863b29e
2 changed files with 1 additions and 3 deletions
|
@ -525,7 +525,7 @@ def setlocale(category, locale=None):
|
|||
category may be given as one of the LC_* values.
|
||||
|
||||
"""
|
||||
if locale and not isinstance(locale, basestring):
|
||||
if locale and type(locale) is not type(""):
|
||||
# convert to string
|
||||
locale = normalize(_build_localename(locale))
|
||||
return _setlocale(category, locale)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue