摘要: 一、装饰器 无参装饰器的实现 如果想为下述函数添加统计其执行时间的功能 import time def index(): time.sleep(3) print('Welcome to the index page’) return 200 index() #函数执行 闭包函数的方案: import 阅读全文
posted @ 2020-12-30 15:32 小绵 阅读(49) 评论(0) 推荐(0) 编辑