摘要: # 必做题:# 1.编写函数,(函数执行的时间用time.sleep(n)模拟) import time def func(x, y): num = x + y time.sleep(3) print(num) return num # 2.编写装饰器,为函数加上统计时间的功能 import tim 阅读全文
posted @ 2020-03-23 22:27 sunshine如你 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 一:储备知识 1.args, kwargs* def index(x,y): print(x,y) def wrapper(*args,**kwargs): index(*args,**kwargs) # # index(y=222,x=111) wrapper(y=222,x=111) 2.名称空 阅读全文
posted @ 2020-03-23 20:30 sunshine如你 阅读(162) 评论(0) 推荐(0) 编辑