``` def log(f): def fn(*args, **kw): print('call ' + f.__name__ + '()...') # 真正需要添加的功能 return f(*args, **kw) return fn @log def factorial(n): from functools import reduce return n**2 print(factorial(10)) # call factorial()... # 3628800 ```