This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mamrhein
Recipients mamrhein
Date 2021-07-01.19:52:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1625169148.48.0.541804995208.issue44547@roundup.psfhosted.org>
In-reply-to
Content
While int, float, complex and Decimal implement __int__, Fraction does not. Thus, checking for typing.SupportsInt for fractions fails, although int(<fraction>) succeeds, because Fraction implements __trunc__.
This looks inconsistent.
Easiest fix seems to be: Fraction.__int__ = Fraction.__trunc__
History
Date User Action Args
2021-07-01 19:52:28mamrheinsetrecipients: + mamrhein
2021-07-01 19:52:28mamrheinsetmessageid: <1625169148.48.0.541804995208.issue44547@roundup.psfhosted.org>
2021-07-01 19:52:28mamrheinlinkissue44547 messages
2021-07-01 19:52:28mamrheincreate