other ways to check for <type 'function'>?
Fredrik Lundh
fredrik at pythonware.com
Thu Nov 2 06:39:41 EST 2006
wittempj at hotmail.com wrote:
> A little experimentation shows that when something is not callable
> always a TypeError which evaluates to "'<type>' object is not
> callable"
that's not defined by the language specification, though, so your code
won't be portable, and may break in future releases.
and even if you can live with that, you still cannot distinguish between
non-callable objects and bugs *inside* the callables, unless you add
traceback analysis to the exception handler.
</F>
More information about the Python-list
mailing list