modify global variable in a decorated function
I have a decorator which inits a global dict which I want to modify within the decorated function. I have tried an implementation something like below:
Why both of the custom decorators are called even if I only called one of them?
This is my custom decorator class. When I decorate them for functions and classes, auxiliary info is printed if these items are used.
How to implement python’s decorators so that it doesn’t execute on recursive calls?
I’m actually trying to implement some decorators in Python to test the performances of my programm, but on recursive fonctions it keeps calling the decorator and produce something unreadable.