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 mark.dickinson
Recipients mark.dickinson
Date 2021-08-22.09:19:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1629623996.0.0.851280826681.issue44977@roundup.psfhosted.org>
In-reply-to
Content
> This decouples int from __trunc__ and leaves __trunc__ as simply the support for the math.trunc function.

Argh; copy and paste fail - I left out the crucial line.

I propose deprecating the delegation of int to __trunc__: calls to int(a) where type(a) implements __trunc__ but not __int__ or __index__ would raise a DeprecationWarning, and at some point in the future int(a) would become a TypeError.
History
Date User Action Args
2021-08-22 09:19:56mark.dickinsonsetrecipients: + mark.dickinson
2021-08-22 09:19:56mark.dickinsonsetmessageid: <1629623996.0.0.851280826681.issue44977@roundup.psfhosted.org>
2021-08-22 09:19:55mark.dickinsonlinkissue44977 messages
2021-08-22 09:19:55mark.dickinsoncreate