Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down