python decorators
it's a syntatical sugar:
@function1 def function2: do something
equal to:
function2 = function1(function2)
so the return type of function1 must be a callable:
def function2(f): return lambda: start() + f() + end()
Aspect-oriented programing

浙公网安备 33010602011771号