def foo():
print "I am foo"
def bar1():
print "I am bar1"
def bar2():
print "I am bar2"
def barN():
print "I am barN"
funobjs_in_foo = get_nest_functions(foo)
def get_nest_functions(funobj):
#how to write this function??
How to get all the nested function objects? I can get the code object of the nesting functions through funobj.func_code.co_consts. But I haven't found a way to get the function objects for the nested functions.
Any help is appreciated.