随笔分类 -  Python 核心语法

摘要:第5章 1.First-Class function 这里的first-class 的意思是 一个函数可以作为对象,在另一个函数中返回 metaclass programming中 也有 first-class class的概念,也就是说 类 可以作为对象, 在另外一个类中 创建,返回 2. 函数参 阅读全文
posted @ 2018-05-09 12:06 eeechoo 阅读(176) 评论(0) 推荐(0)
摘要:fluent python control flow 这几章学习笔记: 第14章 1. Iterable 包含一个__iter__方法,该方法返回一个iterator iterator 包含一个__next__方法和一个__iter__方法,__iter__方法返回自己 所以: 任何iterator 阅读全文
posted @ 2018-05-08 18:50 eeechoo 阅读(487) 评论(0) 推荐(0)
摘要:阅读了fluent python的metaprogramming这一大章节,下面对阅读后产生的感想做一下总结。 首先是关于对象 属性 访问的4个protocol 按照理解可以划分为 __getattribute__ 和 __getattr__ __setattr__ __delattr__ 这样划分 阅读全文
posted @ 2018-05-04 15:47 eeechoo 阅读(189) 评论(0) 推荐(0)
摘要:David Beazley 对 Python中的 生成器(generator)和协程(coroutine)有着深入的理解,并在PyCon会议上做个三个关于这方面的演讲,所以称为三部曲(trilogy)。 目前只完整的读过第二篇 ,以后有机会做个总结。先写着提醒自己 阅读全文
posted @ 2018-01-14 13:44 eeechoo 阅读(111) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/vamei/archive/2012/12/11/2772448.html 对 attribute property > @property @***.setter dynamic attributes > __getattr__ method att 阅读全文
posted @ 2018-01-09 20:56 eeechoo 阅读(241) 评论(0) 推荐(0)