From: Windson yang Date: Thu, 5 Jul 2018 23:09:53 +0000 (+0800) Subject: classify abs() argument type (GH-8103) X-Git-Tag: v3.8.0a1~1436 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ae2e33a61f8aebbe6ce16f1030687a6e66dbb72;p=thirdparty%2FPython%2Fcpython.git classify abs() argument type (GH-8103) --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index f5427a4072a8..6476cbd65e01 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)