Make int() and long() fall back to __trunc__(). See issue 2002.

This commit is contained in:
Jeffrey Yasskin 2008-02-04 01:04:35 +00:00
parent 72a6576279
commit a26cf9b760
5 changed files with 232 additions and 3 deletions

View file

@ -424,8 +424,6 @@ class Rational(RationalAbc):
else:
return a.numerator // a.denominator
__int__ = __trunc__
def __hash__(self):
"""hash(self)