summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r--Doc/library/functions.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index bc42030..9cb6b0e 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -717,8 +717,11 @@ are always available. They are listed here in alphabetical order.
Return an integer object constructed from a number or string *x*, or return
``0`` if no arguments are given. If *x* is a number, return
- :meth:`x.__int__() <object.__int__>`. For floating point numbers, this
- truncates towards zero.
+ :meth:`x.__int__() <object.__int__>`. If *x* defines
+ :meth:`x.__trunc__() <object.__trunc__>` but not
+ :meth:`x.__int__() <object.__int__>`, then return
+ if :meth:`x.__trunc__() <object.__trunc__>`. For floating point numbers,
+ this truncates towards zero.
If *x* is not a number or if *base* is given, then *x* must be a string,
:class:`bytes`, or :class:`bytearray` instance representing an :ref:`integer