摘要: 使用一等函数实现设计模式 中文电子书P278 合理利用作为一等对象的函数,把模式中涉及的某些类的实例替换成简单的函数,从而简化代码。 1. 重构“策略”模式 1. 中文电子书P282 2. Python3.0 3.3中,声明抽象基类要使用metaclass=关键字:class Promotion(m 阅读全文
posted @ 2018-04-13 12:48 Rocin 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 参考: http://blog.jobbole.com/103290/ https://www.zhihu.com/question/19732473/answer/23434554 http://blog.huanghao.me/?p=95 1. 同步和异步关注的是 消息通信机制 。 2. 非阻塞 阅读全文
posted @ 2018-04-13 12:23 Rocin 阅读(381) 评论(0) 推荐(0) 编辑