Message396827
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__ |
|
| Date |
User |
Action |
Args |
| 2021-07-01 19:52:28 | mamrhein | set | recipients:
+ mamrhein |
| 2021-07-01 19:52:28 | mamrhein | set | messageid: <1625169148.48.0.541804995208.issue44547@roundup.psfhosted.org> |
| 2021-07-01 19:52:28 | mamrhein | link | issue44547 messages |
| 2021-07-01 19:52:28 | mamrhein | create | |
|