summaryrefslogtreecommitdiffstats
path: root/Lib/locale.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-06-20 14:14:48 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-06-20 14:14:48 (GMT)
commitc36c6ccb416de0fc4a6635339fa7a7657085a1b7 (patch)
tree875227f099b1a987730465dd6fdb5d893344c46b /Lib/locale.py
parent98fec3aa5eda3836ca818bc6f95f898c81556a1f (diff)
downloadcpython-c36c6ccb416de0fc4a6635339fa7a7657085a1b7.zip
cpython-c36c6ccb416de0fc4a6635339fa7a7657085a1b7.tar.gz
cpython-c36c6ccb416de0fc4a6635339fa7a7657085a1b7.tar.bz2
Close #3067: locale.setlocale() accepts a Unicode locale.
Diffstat (limited to 'Lib/locale.py')
-rw-r--r--Lib/locale.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/locale.py b/Lib/locale.py
index bb4aa37..f204b56 100644
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -525,7 +525,7 @@ def setlocale(category, locale=None):
category may be given as one of the LC_* values.
"""
- if locale and type(locale) is not type(""):
+ if locale and not isinstance(locale, basestring):
# convert to string
locale = normalize(_build_localename(locale))
return _setlocale(category, locale)