摘要: ''1、什么是迭代器 迭代器即迭代取值的工具 迭代: 迭代是一个重复的过程,每一次重复都是基于上一次的结果而来的 单纯的重复并不是迭代 while True: print('1111') 迭代: l=['a','b','c'] def iterator(item): i=0 while i < le 阅读全文
posted @ 2018-06-12 18:35 空杯人 阅读(182) 评论(0) 推荐(0) 编辑
摘要: #基于文件或者其他来源的认证方式:import timeuser={'username':None}def auth(engine): def deco(func): def wrapper(*args,**kwargs): if user['username']: print('已经登陆过了') 阅读全文
posted @ 2018-06-12 17:20 空杯人 阅读(221) 评论(0) 推荐(0) 编辑