mirror of
https://github.com/python/cpython.git
synced 2025-07-29 22:24:49 +00:00
Make int() and long() fall back to __trunc__(). See issue 2002.
This commit is contained in:
parent
72a6576279
commit
a26cf9b760
5 changed files with 232 additions and 3 deletions
|
@ -424,8 +424,6 @@ class Rational(RationalAbc):
|
|||
else:
|
||||
return a.numerator // a.denominator
|
||||
|
||||
__int__ = __trunc__
|
||||
|
||||
def __hash__(self):
|
||||
"""hash(self)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue