From: Michael W. Hudson Date: Wed, 4 May 2005 11:59:38 +0000 (+0000) Subject: Don't use 'is not' to compare strings. X-Git-Tag: v2.5a0~1793 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=abb103b17a5f5b633fc2abed506c20de857d2dff;p=thirdparty%2FPython%2Fcpython.git Don't use 'is not' to compare strings. (spotted by reading pypy-svn :) --- diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py index a564f73985ad..92c220ef6fdd 100644 --- a/Lib/test/test_class.py +++ b/Lib/test/test_class.py @@ -353,7 +353,7 @@ class A: try: A().a # Raised AttributeError: A instance has no attribute 'a' except AttributeError, x: - if str(x) is not "booh": + if str(x) != "booh": print "attribute error for A().a got masked:", str(x) class E: