Skip to content

Commit

Permalink
XXX revert __eq__
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Apr 18, 2018
1 parent 26d62b0 commit 6ec5989
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions diofant/core/numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,13 @@ def __hash__(self):
def __index__(self):
return self.p

def __eq__(self, other):
if isinstance(other, int):
return (self.p == other)
elif isinstance(other, Integer):
return (self.p == other.p)
return Rational.__eq__(self, other)

########################################

def _eval_is_odd(self):
Expand Down

0 comments on commit 6ec5989

Please sign in to comment.