From: Martin v. Löwis Date: Sun, 30 Mar 2003 15:42:13 +0000 (+0000) Subject: Support '' as the argument for the setlocale emulation. Fixes #678259. X-Git-Tag: v2.3c1~1327 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=103d6e7a3c9feed2ef54d51c77f0daa614dc936a;p=python Support '' as the argument for the setlocale emulation. Fixes #678259. --- diff --git a/Lib/locale.py b/Lib/locale.py index 3551261469..2028948e9b 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -69,7 +69,7 @@ except ImportError: """ setlocale(integer,string=None) -> string. Activates/queries locale processing. """ - if value is not None and value != 'C': + if value not in (None, '', 'C'): raise Error, '_locale emulation only supports "C" locale' return 'C'