导航

08 2016 档案

摘要:https://wiki.python.org/moin/PythonDecoratorLibrary#Property_Definition 阅读全文

posted @ 2016-08-25 11:27 网名还没想好 阅读(268) 评论(0) 推荐(0)

摘要:http://blog.csdn.net/gzlaiyonghao/article/details/2834883 阅读全文

posted @ 2016-08-22 12:35 网名还没想好 阅读(202) 评论(0) 推荐(0)

摘要:def convert(data): if isinstance(data, bytes): return data.decode('ascii') if isinstance(data, dict): return dict(map(convert, data.items())) if isinstance(data, tuple): return map(co... 阅读全文

posted @ 2016-08-18 19:03 网名还没想好 阅读(3635) 评论(0) 推荐(0)

摘要:for item in list(somelist): somelist.remove(item) 阅读全文

posted @ 2016-08-18 16:07 网名还没想好 阅读(192) 评论(0) 推荐(0)

摘要:例如: 从数据库里读出了blob类型,如 z = b'61736467' 在py里转化成字符串:bytes.fromhex(z).decode('utf8') 阅读全文

posted @ 2016-08-12 15:03 网名还没想好 阅读(4327) 评论(0) 推荐(0)

摘要:转载自http://weipengfei.blog.51cto.com/1511707/1215042 Redis本身是一个cs模式的tcp server, client可以通过一个socket连续发起多个请求命令。 每个请求命令发出后client通常会阻塞并等待redis服务端处理,redis服务 阅读全文

posted @ 2016-08-10 14:30 网名还没想好 阅读(765) 评论(0) 推荐(0)

摘要:def add_error_handler(app): for exception in default_exceptions: app.register_error_handler(exception, error_handler) app.register_error_handler(Exception, error_handler) def error_h... 阅读全文

posted @ 2016-08-10 10:49 网名还没想好 阅读(872) 评论(0) 推荐(0)

摘要:转自http://get.ftqq.com/523.get 一、redis 数据结构使用场景 原来看过 redisbook 这本书,对 redis 的基本功能都已经熟悉了,从上周开始看 redis 的源码。目前目标是吃透 redis 的数据结构。我们都知道,在 redis 中一共有5种数据结构,那每 阅读全文

posted @ 2016-08-09 17:24 网名还没想好 阅读(208) 评论(0) 推荐(0)

摘要:转自:http://www.binss.me/blog/analyse-the-implement-of-coroutine-in-tornado/ 什么是协程 以下是Wiki的定义: Coroutines are computer program components that generaliz 阅读全文

posted @ 2016-08-09 15:30 网名还没想好 阅读(543) 评论(0) 推荐(0)

摘要:转自:http://blog.rainy.im/2016/03/10/how-the-heck-does-async-await-work-in-python-3-5/ [译] Python 3.5 协程究竟是个啥 Yushneng · Mar 10th, 2016 原文链接 : How the h 阅读全文

posted @ 2016-08-05 17:49 网名还没想好 阅读(341) 评论(0) 推荐(0)