核心思想: 将函数视为变量,用变量调用函数 不修改原函数功能,增加其运行时功能 最简单的例子 def log(func): def wrapper(): print('call wrapper') return func() return wrapper # 加上@log装饰