# coding:utf-8# 带参数装饰器def f1(func): print('开始!') def f2(a): print(func) a() print('执行') return f2@f1('666')def f3(): print('测试开始')# 无参数装饰器def f1(func): print('开始!') def f2(): func() print('执行') return f2@f1def f3(): print('测试开始')if __name__ == '__main__': f3()