Uh oh!
There was an error while loading. Please reload this page.
gh-119740: Remove deprecated trunc delegation - #119743
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
mdickinson
commented
May 31, 2024
Thanks for the comments; I'll address before merging (but it may take me a few days to get to it). |
mdickinson
commented
May 31, 2024
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
mdickinson
commented
Jun 2, 2024
Updating for merge conflicts ... |
Remove the delegation of `int` to the `__trunc__` special method: `int` will now only delegate to `__int__` and `__index__` (in that order). `__trunc__` continues to exist, but its sole purpose is to support `math.trunc`. --------- Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Remove the delegation of `int` to the `__trunc__` special method: `int` will now only delegate to `__int__` and `__index__` (in that order). `__trunc__` continues to exist, but its sole purpose is to support `math.trunc`. --------- Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Remove the delegation of `int` to the `__trunc__` special method: `int` will now only delegate to `__int__` and `__index__` (in that order). `__trunc__` continues to exist, but its sole purpose is to support `math.trunc`. --------- Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This was done in python#119743 (3.14).
…on (pythonGH-144622) This was done in pythonGH-119743 (3.14). (cherry picked from commit aa6ed80) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
…on (pythonGH-144622) This was done in pythonGH-119743 (3.14).
…on (pythonGH-144622) This was done in pythonGH-119743 (3.14).
This PR removes the delegation of
intto the__trunc__special method:intwill now only delegate to__int__and__index__(in that order).__trunc__continues to exist, but its sole purpose is to supportmath.trunc.📚 Documentation preview 📚: https://cpython-previews--119743.org.readthedocs.build/