8000 bpo-45583: Correct datamodel documentation of int() (GH-29182) (GH-29… · python/cpython@76658e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 76658e5

Browse files
bpo-45583: Correct datamodel documentation of int() (GH-29182) (GH-29287)
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 <arthur@milchior.fr>
1 parent f19c1a1 commit 76658e5

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

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

25132513

25142514
.. _context-managers:

0 commit comments

Comments
 (0)
0