I'd like to figure out if a given parameter is a function or not.
E.g.
<type 'int'>
True
implies:
.... pass
....
<type '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!
E.g.
>>type(1)
>>type(1) == int
implies:
>>def foo():
....
>>type(foo)
>>type(foo) == function
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!
Comment