]> granicus.if.org Git - python/commitdiff
Revert d370d609d09b as requested by Terry Jan Reedy:
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 20 Jun 2011 20:07:06 +0000 (22:07 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 20 Jun 2011 20:07:06 +0000 (22:07 +0200)
"#3067: locale.setlocale() accepts a Unicode locale."

Lib/locale.py
Misc/NEWS

index f204b564b93c666f71ef8db727db802b4305692a..bb4aa37b2906bdc9e27e67702a36eac476f3a9de 100644 (file)
@@ -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)
index d45582894ca7c35ef12a00342fe63142e7346ae6..2e33e7f5b801d920203eda6b185e59349ce3d05e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -16,8 +16,6 @@ Core and Builtins
 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.