Skip to content

Commit

Permalink
bpo-34850: Replace is with == in idlelib.iomenu (GH-9649)
Browse files Browse the repository at this point in the history
Patch by Serhiy Storchaka (in PR GH-9642).
(cherry picked from commit 5fa247d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
  • Loading branch information
miss-islington and terryjreedy committed Sep 30, 2018
1 parent 3cd5e8e commit cb0bec3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/idlelib/iomenu.py
Expand Up @@ -40,7 +40,7 @@
# resulting codeset may be unknown to Python. We ignore all
# these problems, falling back to ASCII
locale_encoding = locale.nl_langinfo(locale.CODESET)
if locale_encoding is None or locale_encoding is '':
if locale_encoding is None or locale_encoding == '':
# situation occurs on Mac OS X
locale_encoding = 'ascii'
codecs.lookup(locale_encoding)
Expand All @@ -50,7 +50,7 @@
# bugs that can cause ValueError.
try:
locale_encoding = locale.getdefaultlocale()[1]
if locale_encoding is None or locale_encoding is '':
if locale_encoding is None or locale_encoding == '':
# situation occurs on Mac OS X
locale_encoding = 'ascii'
codecs.lookup(locale_encoding)
Expand Down

0 comments on commit cb0bec3

Please sign in to comment.