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

(spotted by reading pypy-svn :)
This commit is contained in:
Michael W. Hudson 2005-05-04 11:59:38 +00:00
parent 7c5e618577
commit abb103b17a
1 changed files with 1 additions and 1 deletions

View 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: