Consider a function that contains definitions of some other functions. Is there a way to list all the functions defined inside a function?
For example, if there is a function f
defined as below, how can I list
all the functions defined within f
?
def f(x):
def g(y):
return y
def h(z):
return z
return x