]> granicus.if.org Git - python/commitdiff
setlocale(): In _locale-missing compatibility function, string
authorBarry Warsaw <barry@python.org>
Fri, 23 Mar 2001 17:00:07 +0000 (17:00 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 23 Mar 2001 17:00:07 +0000 (17:00 +0000)
comparison should be done with != instead of "is not".

Lib/locale.py

index 7a03722a3a717f308fa9b440f463d7d35e9f6b21..d26560d69d7ee83d02f7f4f3b1dc8244ac751ada 100644 (file)
@@ -69,8 +69,7 @@ except ImportError:
         """ setlocale(integer,string=None) -> string.
             Activates/queries locale processing.
         """
-        if value is not None and \
-           value is not 'C':
+        if value is not None and value != 'C':
             raise Error, '_locale emulation only supports "C" locale'
         return 'C'