#装饰器简单操作 def a(func): def a_inner(str): print(str) func() print('-----') return a_inner # @a装饰器相当于b = a(b) @a def b(): print('hallo b') b('hello a')
python装饰器简单操作
猜你喜欢
转载自blog.csdn.net/weixin_42670402/article/details/82313125
今日推荐
周排行