From: Raymond Hettinger Date: Fri, 31 May 2002 17:49:10 +0000 (+0000) Subject: Replace '== None' with 'is None' X-Git-Tag: v2.3c1~5545 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7fdfc2d231e4d41a5bb6dd737200d3460aa39773;p=thirdparty%2FPython%2Fcpython.git Replace '== None' with 'is None' --- diff --git a/Lib/hmac.py b/Lib/hmac.py index cae08002e55d..c9e4ae804786 100644 --- a/Lib/hmac.py +++ b/Lib/hmac.py @@ -27,7 +27,7 @@ class HMAC: msg: Initial input for the hash, if provided. digestmod: A module supporting PEP 247. Defaults to the md5 module. """ - if digestmod == None: + if digestmod is None: import md5 digestmod = md5 diff --git a/Lib/smtplib.py b/Lib/smtplib.py index bb8fd75e8eb8..80e6508281dd 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -549,7 +549,7 @@ class SMTP: elif authmethod == AUTH_PLAIN: (code, resp) = self.docmd("AUTH", AUTH_PLAIN + " " + encode_plain(user, password)) - elif authmethod == None: + elif authmethod is None: raise SMTPException("No suitable authentication method found.") if code not in [235, 503]: # 235 == 'Authentication successful'