]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport Lib/test/test_class.py revision 1.13:
authorMichael W. Hudson <mwh@python.net>
Thu, 16 Jun 2005 14:53:22 +0000 (14:53 +0000)
committerMichael W. Hudson <mwh@python.net>
Thu, 16 Jun 2005 14:53:22 +0000 (14:53 +0000)
Don't use 'is not' to compare strings.
(spotted by reading pypy-svn :)

Lib/test/test_class.py

index a564f73985ad0efb26b7c9cb4bfcfb62f5bb47da..92c220ef6fdd5c44be4ef9206eda98cb93bdc598 100644 (file)
@@ -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: