Skip to content

Commit 3767e0d

Browse files
bpo-45583: Correct datamodel documentation of int() (GH-29182) (GH-29286)
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. (cherry picked from commit d9c1868) Co-authored-by: Arthur Milchior <[email protected]>
1 parent 01d11b1 commit 3767e0d

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
@@ -2512,8 +2512,8 @@ left undefined.
25122512
return the value of the object truncated to an :class:`~numbers.Integral`
25132513
(typically an :class:`int`).
25142514

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

25182518

25192519
.. _context-managers:

0 commit comments

Comments
 (0)