[Python-checkins] cpython (2.7): Revert d370d609d09b as requested by Terry Jan Reedy:
victor.stinner
python-checkins at python.org
Mon Jun 20 22:07:06 CEST 2011
http://hg.python.org/cpython/rev/e72a2a60316f
changeset: 70912:e72a2a60316f
branch: 2.7
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Mon Jun 20 22:07:06 2011 +0200
summary:
Revert d370d609d09b as requested by Terry Jan Reedy:
"#3067: locale.setlocale() accepts a Unicode locale."
files:
Lib/locale.py | 2 +-
Misc/NEWS | 2 --
2 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/Lib/locale.py b/Lib/locale.py
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -525,7 +525,7 @@
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)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -16,8 +16,6 @@
Library
-------
-- Issue #3067: locale.setlocale() accepts a Unicode locale.
-
- Issue #11700: mailbox proxy object close methods can now be called multiple
times without error, and _ProxyFile now closes the wrapped file.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list