From 3ae2e33a61f8aebbe6ce16f1030687a6e66dbb72 Mon Sep 17 00:00:00 2001 From: Windson yang Date: Fri, 6 Jul 2018 07:09:53 +0800 Subject: [PATCH] classify abs() argument type (GH-8103) --- Doc/library/functions.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index f5427a4072a..6476cbd65e0 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -44,7 +44,8 @@ are always available. They are listed here in alphabetical order. Return the absolute value of a number. The argument may be an integer or a floating point number. If the argument is a complex number, its - magnitude is returned. + magnitude is returned. If *x* defines :meth:`__abs__`, + ``abs(x)`` returns ``x.__abs__()``. .. function:: all(iterable)