[Python-ideas] Bring back callable()

Alexandre Conrad alexandre.conrad at gmail.com
Wed Nov 24 00:15:46 CET 2010


2010/11/23 Antoine Pitrou <solipsis at pitrou.net>:
> So, I would advocate bringing back the callable() builtin, which was
> easy to use, helpful and semantically sane.

What about:

hasattr(obj, '__call__')

?

-- 
Alex | twitter.com/alexconrad



More information about the Python-ideas mailing list