[issue44547] fraction.Fraction does not implement __int__.

Serhiy Storchaka report at bugs.python.org
Fri Aug 20 06:36:25 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Fraction.__int__ = Fraction.__trunc__ may not work because __trunc__() can return any object with __index__, while __int__ should return an exact int (not even an int subclass).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44547>
_______________________________________


More information about the Python-bugs-list mailing list