From: Barry Warsaw Date: Fri, 23 Mar 2001 17:00:07 +0000 (+0000) Subject: setlocale(): In _locale-missing compatibility function, string X-Git-Tag: v2.1b2~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7519e7af4207b46909de6374adac520f9205fe4f;p=python setlocale(): In _locale-missing compatibility function, string comparison should be done with != instead of "is not". --- diff --git a/Lib/locale.py b/Lib/locale.py index 7a03722a3a..d26560d69d 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -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'