定义一个装饰器deffn(fn1):deffn2(*args,**kwargs):ret=fn1(*args,**kwargs)returnretreturnfn2use@fn
pythondecorator相关文章