I have three python functions:
def decorator_function(func)
def wrapper(..)
return func(*args, **kwargs)
return wrapper
def plain_func(...)
@decorator_func
def wrapped_func(....)
inside a module A.
Now I want to get all the functions inside this module A, for which I do:
for fname, func in inspect.getmembers(A, inspect.isfunction):
# My code
The problem here is that the value of func is not what I want it to be.
It would be decorator_function, plain_func and wrapper (instead of wrapped_func).
How can I make sure that wrapped_func is returned instead of wrapper?