[Python-ideas] Why is there a callable predicate, but no iterable?

Terry Reedy tjreedy at udel.edu
Fri Sep 25 22:01:36 CEST 2009

Andrey Fedorov wrote:

> What is the tradeoff between hasattr(f, '__call__')

I know about that ;-)

> and isinstance(f, Callable)?

New to me ;-)
I presume it needs an import.
I presume it also requires that something be registered as a Callable.

Terry Jan Reedy

More information about the Python-ideas mailing list