2017年8月29日

装饰器

摘要: from functools import wraps# def a_new_decorator(a_func):# @wraps(a_func)# def wrapTheFunction():# print("I am doing some boring work before executing 阅读全文

posted @ 2017-08-29 13:38 Jt00 阅读(166) 评论(0) 推荐(0) 编辑

完全理解Python迭代对象、迭代器、生成器

摘要: 1.assert:python assert断言是声明其布尔值必须为真的判定,如果发生异常就说明表达示为假。可以理解assert断言语句为raise-if-not,用来测试表示式,其返回值为假,就会触发异常。 2. 容器(container) 容器是一种把多个元素组织在一起的数据结构, 容器中的元素 阅读全文

posted @ 2017-08-29 13:37 Jt00 阅读(197) 评论(0) 推荐(0) 编辑

导航