def set_func(func): def call_func(): print('....权限1.....') print('....权限2.....') func() return call_func @set_func # 等价于 test1 = set_func(test1) def test1(): print(".......这是test1......") test1()