摘要: 1 属性访问优先级为 1 __getattribute__(), 入口 2 数据描述符 3 实例对象的字典 obj.__dict__ (若与描述符同对象名,会被覆盖) 4 类的字典 Class.__dict__ 5 非数据描述符 6 父类的字典 7 __getattr__() 2 调用流程 假设我们 阅读全文
posted @ 2017-11-18 09:11 fuzzier 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 总的来说python的 magic method 主要是围绕一些类中形如 __xx__ 的样子的方法。 1 构造对象和初始化对象 __new__, __init__ 等 2 控制属性访问 __getattribute__, __setattr__ 等 3 创建对象描述符 __get__, __set 阅读全文
posted @ 2017-09-13 00:02 fuzzier 阅读(598) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-11-18 14:20 fuzzier 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 转自:https://studygolang.com/articles/3491 协程 约等于 微线程,更轻量 线程:协程 = M:N,M:N golang scheduler 使用的m:n调度模型,即任意数量的用户态协程可以运行在任意数量的os线程上,这样不仅可以使得上线文切换更加轻量级,同时又可 阅读全文
posted @ 2019-03-20 14:40 fuzzier 阅读(766) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/ybf-yyj/p/10251186.html 阅读全文
posted @ 2019-02-27 21:59 fuzzier 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1 linuxIO模式select, poll, epoll 2 阻塞与非阻塞,同步与异步,来自知乎 3 tornado ioloop原理 4 epoll的具体解释,来自知乎 5 epoll实现原理 阅读全文
posted @ 2019-02-21 09:57 fuzzier 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 转自: https://wiki.python.org/moin/TimeComplexity 阅读全文
posted @ 2018-11-13 12:07 fuzzier 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 主要参考 http://python.jobbole.com/85685/ 算法更新顺序 DFS : 存在多继承中无法重写问题 BFS:存在继承单调性问题 C3算法:算法像是 拓扑排序+优先最左 的方式 阅读全文
posted @ 2018-11-02 17:21 fuzzier 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 转载: https://blog.csdn.net/u011239443/article/details/60604017 阅读全文
posted @ 2018-09-25 15:24 fuzzier 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 看了flask的session源码,知道了flask的session flask的open_session源码 可以从源码中看出,session中存放了 life_time 所以可以根据这个存活时间进行session过滤。 阅读全文
posted @ 2018-09-10 11:13 fuzzier 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 地址: https://blog.csdn.net/macb007/article/details/78887282 阅读全文
posted @ 2018-08-27 10:33 fuzzier 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 这里主要介绍一些heapq的常用方法 from heapq import * 1 heapify(list) 将序列list变成heap结构 2 heappush(heap, item), 向序列heap中插入一个item 3 heappop(heap), pop出堆中的最小值 4 heaprepl 阅读全文
posted @ 2018-08-15 16:51 fuzzier 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 地址: https://blog.csdn.net/u011734144/article/details/52817766/ 阅读全文
posted @ 2018-08-15 09:31 fuzzier 阅读(95) 评论(0) 推荐(0) 编辑