装饰器的固定模式
def warpper(f): def inner(*args,**kwargs): print("WDNMD") ret = f(*args,**kwargs) return ret return inner @warpper def func(a,b): print("我炸了",a,b) return "秋梨膏" ret = func(1,b=[2,3]) print(ret)
原文:https://www.cnblogs.com/yandw/p/11111077.html