![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
linux2015
data is everything.
展开
-
GRPC python编译.proto
python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ./data.proto原创 2017-07-28 15:51:18 · 1898 阅读 · 0 评论 -
关于Python类属性与实例属性的讨论
关于Python类属性与实例属性的讨论23456789101112131415classAAA(): aaa=10 # 情形1 obj1=AAA() obj2转载 2017-08-03 17:03:18 · 288 阅读 · 0 评论 -
ImportError: No module named yaml
pip install pyyaml lets you import yaml. This package enables Python to parse YAML files.pip install pyaml lets you import pyaml. This package allows pretty-printing of YAML files原创 2017-08-18 13:46:24 · 3468 阅读 · 0 评论 -
使用 Python Mock 类进行单元测试
使用 Python Mock 类进行单元测试转自:点击打开链接https://www.oschina.net/translate/unit-testing-with-the-python-mock-class?lang=chs&page=1#数据类型、模型或节点——这些都只是mock对象可承担的角色。但mock在单元测试中扮演一个什么角色呢?有时,你需要为单转载 2017-08-04 21:25:09 · 441 阅读 · 0 评论 -
dict in dict : sort and filter dict by sub-dict value in multi condition
data = {1:{"attack":10,"lv":4,"id":2,"owner":1},5:{"attack":10,"lv":4,"id":3,"owner":1}, 3:{"attack":10,"lv":5,"id":4,"owner":1},4:{"attack":9,"lv":4,"id":5,"owner":1}, 2: {"attack": 10, "lv":原创 2017-12-19 16:57:38 · 205 阅读 · 0 评论