Fix the __eq__ operator for ArrayType

This commit is contained in:
Christophe de Vienne 2012-11-28 22:21:39 +01:00
parent cf0b4c4ea3
commit a8be9c213c

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