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 josh.r
Recipients josh.r, mamrhein
Date 2021-07-02.02:25:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1625192752.34.0.14779446758.issue44547@roundup.psfhosted.org>
In-reply-to
Content
Seems like an equally reasonable solution would be to make class's with __trunc__ but not __int__ automatically generate a __int__ in terms of __trunc__ (similar to __str__ using __repr__ when the latter is defined but not the former). The inconsistency is in both methods existing, but having the equivalence implemented in int() rather than in the type (thereby making SupportsInt behave unexpectedly, even though it's 100% true that obj.__int__() would fail).
History
Date User Action Args
2021-07-02 02:25:52josh.rsetrecipients: + josh.r, mamrhein
2021-07-02 02:25:52josh.rsetmessageid: <1625192752.34.0.14779446758.issue44547@roundup.psfhosted.org>
2021-07-02 02:25:52josh.rlinkissue44547 messages
2021-07-02 02:25:52josh.rcreate