E
elderic
Hi there,
are there other ways than the ones below to check for <type 'function'>
in a python script?
(partly inspired by wrapping Tkinter )
def f():
print "This is f(). Godspeed!"
1.: --> sort of clumsy and discouraged by the docs as far as I read
import types
type(f) is types.FunctionType
2.: --> I don't like this one at all
def null(): pass
type(f) is type(null)
Basically I'm searching for something like:
"type(f) is func" like in: "type(x) is int"
Any ideas? =)
are there other ways than the ones below to check for <type 'function'>
in a python script?
(partly inspired by wrapping Tkinter )
def f():
print "This is f(). Godspeed!"
1.: --> sort of clumsy and discouraged by the docs as far as I read
import types
type(f) is types.FunctionType
2.: --> I don't like this one at all
def null(): pass
type(f) is type(null)
Basically I'm searching for something like:
"type(f) is func" like in: "type(x) is int"
Any ideas? =)