标签:pre for class before *args wrapper span war style
通用装饰器
def wrapper(fun): def inner(*args,**kwargs): print(f"before execute target {fun} ") ret=fun() print(f"after execute target {fun}") return ret return inner @wrapper def fun(*args,**kwargs): print("test") return 1
标签:pre for class before *args wrapper span war style
原文地址:https://www.cnblogs.com/yan-2010/p/14814982.html