What\'s the best way to toggle decorators on and off, without actually going to each decoration and commenting it out? Say you have a benchmarking decorator:
You could add the conditional to the decorator itself:
def benchmark(func): if not : return func def decorator(): # fancy benchmarking return decorator