New submission from Windson Yang <wiwind...@gmail.com>:

Just like callable() method in 
https://docs.python.org/3/library/functions.html#callable

> ...instances are callable if their class has a __call__() method.

I think we should also mention this in abs(),

abs(x)
Return the absolute value of a number. If x defines __abs__, abs(x) returns 
x.__abs__(). The argument may be an integer or a floating point number. If the 
argument is a complex number, its magnitude is returned.

----------
components: Library (Lib)
messages: 321080
nosy: Windson Yang
priority: normal
severity: normal
status: open
title: abs() method accept argument that implement __abs__()
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34049>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to