other ways to check for <type 'function'>?

Fredrik Lundh fredrik at pythonware.com
Thu Nov 2 17:01:04 CET 2006


elderic wrote:

> I just wanted to know if there was a keyword for functions, too.
> 
> Then u could've done: type(f) is function
> quite similar to: type(x) is int

but why do you think you need that, when you have callable() ?  unless 
you're doing specialized stuff, there's really no reason to distinguish 
between function objects and other callables.

</F>




More information about the Python-list mailing list