I am decorating a function foo with a_decorator
@a_decorator(params) def foo(x): # print('Called',decorator_name) # other magic Is there a way to access the name a_decorator inside foo so that I can print
'Called a_decorator'
def a_decorator(some_function): def wrapper(): some_function() return some_val return wrapper
a_decoratordefined?