◐ Shell
clean mode source ↗

[3.9] Indicate that abs() method accept argument that implement __abs__(), just like call() method in the docs (GH-20509) by miss-islington · Pull Request #20510 · python/cpython

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