summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-05-29 04:42:40 -0700
committerGitHub <noreply@github.com>2020-05-29 04:42:40 -0700
commit8e5f11d1f8bf6d3bf7265acdd8f06f1854a5482a (patch)
tree4737e614b4d8b5eaeabaa6ff41bc69487eabfd1a
parent6637bd45163024f2187e40d2cc12c473f78bf5da (diff)
downloadcpython-git-8e5f11d1f8bf6d3bf7265acdd8f06f1854a5482a.tar.gz
Indicate that abs() method accept argument that implement __abs__(), just like call() method in the docs (GH-20509)
(cherry picked from commit 28316422124206f63ddd4b91f2e19c54b6e9cd9d) Co-authored-by: Windson yang <wiwindson@outlook.com>
-rw-r--r--Doc/library/functions.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 90a2370c17..e9c92f7c82 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -43,9 +43,8 @@ are always available. They are listed here in alphabetical order.
.. function:: abs(x)
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. If *x* defines :meth:`__abs__`,
- ``abs(x)`` returns ``x.__abs__()``.
+ integer, a floating point number, or an object implementing :meth:`__abs__`.
+ If the argument is a complex number, its magnitude is returned.
.. function:: all(iterable)