def bett(f): def inner(): print(‘123‘) f() print(‘hello‘) return inner @bett def f(): print(‘abc‘) f()
装饰器函数
原文:https://www.cnblogs.com/xusuns/p/8448932.html