2 ms·
Yeah the standard "I'm gonna make a decorator for this" template is def decorate(<decorator args>): def _decorate(<thing to be decorated>):
by Spivak 3y ago
Yeah the standard "I'm gonna make a decorator for this" template is
def decorate(<decorator args>):
def _decorate(<thing to be decorated>):
pass
return _decorate
@decorate(foo=1)
def myfunc():
pass