摘要:
*****装饰器攻坚前置任务 # 1. *args, **kwargs def index(x, y): print(x, y) def wrapper(*args, **kwargs): index(*args, **kwargs) # 1.wrapper传的实参是什么形式会原封不动的传到inde 阅读全文
摘要:
# 一:编写函数,(函数执行的时间用time.sleep(n)模拟) import time def index(): time.sleep(3) print('工具人') # 二:编写装饰器,为函数加上统计时间的功能 import time def timeer(func): def upper( 阅读全文