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

Assert only if instances match.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1981 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e491060e
...@@ -115,6 +115,7 @@ class Enum(dict): ...@@ -115,6 +115,7 @@ class Enum(dict):
if other is None: if other is None:
return False return False
assert isinstance(other, (Enum.Item, int, float, long)) assert isinstance(other, (Enum.Item, int, float, long))
if isinstance(other, Enum):
assert self._enum == other._enum assert self._enum == other._enum
return int(self) == int(other) return int(self) == int(other)
......
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