summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2024-06-02 09:16:49 (GMT)
committerGitHub <noreply@github.com>2024-06-02 09:16:49 (GMT)
commitf79ffc879b919604ed5de22ece83825006cf9a17 (patch)
tree4174214b7ad81d2277e584d4fa9e6c1ccec3e95a /Doc/reference
parent4aed319a8eb63b205d6007c36713cacdbf1ce8a3 (diff)
downloadcpython-f79ffc879b919604ed5de22ece83825006cf9a17.zip
cpython-f79ffc879b919604ed5de22ece83825006cf9a17.tar.gz
cpython-f79ffc879b919604ed5de22ece83825006cf9a17.tar.bz2
gh-119740: Remove deprecated trunc delegation (#119743)
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>
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst7
1 files changed, 2 insertions, 5 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 9110060..af4c585 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -3127,11 +3127,8 @@ left undefined.
return the value of the object truncated to an :class:`~numbers.Integral`
(typically an :class:`int`).
- The built-in function :func:`int` falls back to :meth:`__trunc__` if neither
- :meth:`__int__` nor :meth:`__index__` is defined.
-
- .. versionchanged:: 3.11
- The delegation of :func:`int` to :meth:`__trunc__` is deprecated.
+ .. versionchanged:: 3.14
+ :func:`int` no longer delegates to the :meth:`~object.__trunc__` method.
.. _context-managers: