Skip to content

Commit d9c1868

Browse files
bpo-45583: Correct datamodel documentation of int() (GH-29182)
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.
1 parent cd30613 commit d9c1868

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/reference/datamodel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2577,8 +2577,8 @@ left undefined.
25772577
return the value of the object truncated to an :class:`~numbers.Integral`
25782578
(typically an :class:`int`).
25792579

2580-
If :meth:`__int__` is not defined then the built-in function :func:`int`
2581-
falls back to :meth:`__trunc__`.
2580+
The built-in function :func:`int` falls back to :meth:`__trunc__` if neither
2581+
:meth:`__int__` nor :meth:`__index__` is defined.
25822582

25832583

25842584
.. _context-managers:

0 commit comments

Comments
 (0)