]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34850: Replace is with == in idlelib.iomenu (GH-9649)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 30 Sep 2018 21:40:56 +0000 (14:40 -0700)
committerGitHub <noreply@github.com>
Sun, 30 Sep 2018 21:40:56 +0000 (14:40 -0700)
Patch by Serhiy Storchaka (in PR GH-9642).
(cherry picked from commit 5fa247d60d4f3f2b8c8ae8cb57363aca234344c2)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lib/idlelib/iomenu.py

index 63d107dd9003df163cb2df04d9ccf2cfc24497b9..fcd8dcc1393da7ce23282bfd2d9f542df32b0b4c 100644 (file)
@@ -40,7 +40,7 @@ else:
             # 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)
@@ -50,7 +50,7 @@ else:
             # 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)