Commit abb103b1 authored by Michael W. Hudson's avatar Michael W. Hudson

Don't use 'is not' to compare strings.

(spotted by reading pypy-svn :)
parent 7c5e6185
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment