摘要: #decorator意思:1.装饰器 2.语法糖 import time user,passwd='qi','123' def auth(func): def wrappper(*args, **kwargs): username = input('Username:').strip() password = input('password:').str... 阅读全文
posted @ 2018-01-29 23:05 耐烦不急 阅读(116) 评论(0) 推荐(0) 编辑
摘要: import time def timer(func): #timer(test1) func=test1 def deco(*args,**kwargs): start_time=time.time() func(*args,**kwargs) #run test1() stop_time = time.time() ... 阅读全文
posted @ 2018-01-29 12:16 耐烦不急 阅读(153) 评论(0) 推荐(0) 编辑