[issue10518] Bring back callable()

Antoine Pitrou report at bugs.python.org
Sun Nov 28 00:00:41 CET 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

> > ABCs are still the exception in Python, and duck typing is still the
> rule.
> 
> Then why do we callable again?

Because the way __call__ is looked up means hasattr(x, "__call__") is
not the right answer. Otherwise there would be no point in bringing it
back at all.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10518>
_______________________________________


More information about the Python-bugs-list mailing list