I'd like to figure out if a given parameter is a function or not.

E.g.

>>> type(1)
<type 'int'>
>>> type(1) == int
True

implies:

>>> def foo():
...   pass
...
>>> type(foo)
<type 'function'>
>>> type(foo) == function
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: name 'function' is not defined

Is there a way I can know if 'foo' is a function?

thanks,
-tom!
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to