Commit c51d17dc authored by Grégory Wisniewski's avatar Grégory Wisniewski

Assert only if instances match.

git-svn-id: 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e491060e
......@@ -115,7 +115,8 @@ class Enum(dict):
if other is None:
return False
assert isinstance(other, (Enum.Item, int, float, long))
assert self._enum == other._enum
if isinstance(other, Enum):
assert self._enum == other._enum
return int(self) == int(other)
def __init__(self):
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