[Python-checkins] bpo-34850: Replace is with == in idlelib.iomenu (GH-9649)
Miss Islington (bot)
webhook-mailer at python.org
Sun Sep 30 17:40:59 EDT 2018
https://github.com/python/cpython/commit/cb0bec37dd8279555bc01fa03a259eaf7dbb6d5d
commit: cb0bec37dd8279555bc01fa03a259eaf7dbb6d5d
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-09-30T14:40:56-07:00
summary:
bpo-34850: Replace is with == in idlelib.iomenu (GH-9649)
Patch by Serhiy Storchaka (in PR GH-9642).
(cherry picked from commit 5fa247d60d4f3f2b8c8ae8cb57363aca234344c2)
Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>
files:
M Lib/idlelib/iomenu.py
diff --git a/Lib/idlelib/iomenu.py b/Lib/idlelib/iomenu.py
index 63d107dd9003..fcd8dcc1393d 100644
--- a/Lib/idlelib/iomenu.py
+++ b/Lib/idlelib/iomenu.py
@@ -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)
@@ -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)
More information about the Python-checkins
mailing list