Indicate that abs() method accept argument that implement __abs__(), just like call() method in the docs (GH-20509)

(cherry picked from commit 2831642212)

Co-authored-by: Windson yang <wiwindson@outlook.com>
This commit is contained in:
Miss Islington (bot) 2020-05-29 04:42:40 -07:00 committed by GitHub
parent 6637bd4516
commit 8e5f11d1f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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)