摘要: 装饰器:以某种方式增强函数。两大特性:1、可以将被装饰的函数替换成其他函数。 2、在加载模块时立即执行。案例1def make_avarage(): count=0 total=0 def averager(new_value): count+=1 total+=new_value return t 阅读全文
posted @ 2020-05-04 22:06 何双新 阅读(180) 评论(0) 推荐(0) 编辑