Preferred pattern for enabling and disabling existing decorators?

后端 未结 0 940
逝去的感伤
逝去的感伤 2021-02-15 05:21

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

def profile(func):
          


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