Preferred pattern for enabling and disabling existing decorators?

后端 未结 0 1480
花落未央
花落未央 2021-02-15 05:48

I would like to switch on/off existing decorators programmatically. An example decorator is profiling, which would be turned on occasionally:

def profile(func):
          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题