I am trying to build a control structure in a class method that takes a function as input and has different behaviors if a function is decorated or not. Any ideas on how you would go about building a function is_decorated
that behaves as follows:
def dec(fun):# do decorationdef func(data):# do stuff@dec
def func2(data):# do other stuffdef is_decorated(func):# return True if func has decorator, otherwise Falseis_decorated(func) # False
is_decorated(func2) # True