summaryrefslogtreecommitdiffstats
path: root/Lib/locale.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-16 18:12:55 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-16 18:12:55 (GMT)
commit3172c5d263eeffff1e89d03d79be3ccc1d60fbde (patch)
treea35e103b36b684c4682ded57236199d6a0ecee4b /Lib/locale.py
parent60d241f135f10312f5a638846659d7e471f6cac9 (diff)
downloadcpython-3172c5d263eeffff1e89d03d79be3ccc1d60fbde.zip
cpython-3172c5d263eeffff1e89d03d79be3ccc1d60fbde.tar.gz
cpython-3172c5d263eeffff1e89d03d79be3ccc1d60fbde.tar.bz2
Patch# 1258 by Christian Heimes: kill basestring.
I like this because it makes the code shorter! :-)
Diffstat (limited to 'Lib/locale.py')
-rw-r--r--Lib/locale.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/locale.py b/Lib/locale.py
index b8bc567..3f30ca0 100644
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -12,6 +12,7 @@
"""
import sys, encodings, encodings.aliases
+from __builtin__ import str as _builtin_str
# Try importing the _locale module.
#
@@ -472,7 +473,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 not isinstance(locale, _builtin_str):
# convert to string
locale = normalize(_build_localename(locale))
return _setlocale(category, locale)