Skip to content

Commit cb0bec3

Browse files
bpo-34850: Replace is with == in idlelib.iomenu (GH-9649)
Patch by Serhiy Storchaka (in PR GH-9642). (cherry picked from commit 5fa247d) Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 3cd5e8e commit cb0bec3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/idlelib/iomenu.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# resulting codeset may be unknown to Python. We ignore all
4141
# these problems, falling back to ASCII
4242
locale_encoding = locale.nl_langinfo(locale.CODESET)
43-
if locale_encoding is None or locale_encoding is '':
43+
if locale_encoding is None or locale_encoding == '':
4444
# situation occurs on Mac OS X
4545
locale_encoding = 'ascii'
4646
codecs.lookup(locale_encoding)
@@ -50,7 +50,7 @@
5050
# bugs that can cause ValueError.
5151
try:
5252
locale_encoding = locale.getdefaultlocale()[1]
53-
if locale_encoding is None or locale_encoding is '':
53+
if locale_encoding is None or locale_encoding == '':
5454
# situation occurs on Mac OS X
5555
locale_encoding = 'ascii'
5656
codecs.lookup(locale_encoding)

0 commit comments

Comments
 (0)