Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7519e7a

Browse files
committed
setlocale(): In _locale-missing compatibility function, string
comparison should be done with != instead of "is not".
1 parent 2262a80 commit 7519e7a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Lib/locale.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ def setlocale(category, value=None):
6969
""" setlocale(integer,string=None) -> string.
7070
Activates/queries locale processing.
7171
"""
72-
if value is not None and \
73-
value is not 'C':
72+
if value is not None and value != 'C':
7473
raise Error, '_locale emulation only supports "C" locale'
7574
return 'C'
7675

0 commit comments

Comments
 (0)