Fix the __eq__ operator for ArrayType

--HG--
extra : rebase_source : d7ad32012a9b93aa898b5c673e46cdf0047211e8
This commit is contained in:
Christophe de Vienne 2012-11-28 22:21:39 +01:00
parent 440a3b47ea
commit 71b667a5e1

View File

@ -31,7 +31,8 @@ class ArrayType(object):
return hash(self.item_type)
def __eq__(self, other):
return self.item_type == other.item_type
return isinstance(other, ArrayType) \
and self.item_type == other.item_type
@property
def item_type(self):