]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45583: Correct datamodel documentation of int() (GH-29182)
authorArthur Milchior <arthur@milchior.fr>
Thu, 28 Oct 2021 19:48:37 +0000 (21:48 +0200)
committerGitHub <noreply@github.com>
Thu, 28 Oct 2021 19:48:37 +0000 (21:48 +0200)
It should be noted that this part of the documentation is redundant with
function.rst's documentation of int. This one was correctly updated with Python 3.8.

Doc/reference/datamodel.rst

index f1334f047d4b737f68e066a77d7c2c58fc5fe8bd..a6eee22fa332cdc42f81c890c4d72f28995511c4 100644 (file)
@@ -2577,8 +2577,8 @@ left undefined.
    return the value of the object truncated to an :class:`~numbers.Integral`
    (typically an :class:`int`).
 
-   If :meth:`__int__` is not defined then the built-in function :func:`int`
-   falls back to :meth:`__trunc__`.
+   The built-in function :func:`int` falls back to :meth:`__trunc__` if neither
+   :meth:`__int__` nor :meth:`__index__` is defined.
 
 
 .. _context-managers: