
python
runnerchen1
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python dict字典循环遍历性能 iteritems比items快
dict字典循环遍历,从测试结果看,iteritems比items快一个数量级 In [32]: def add_dic(a, num): ...: for i in range(num): ...: a[i] = "value" + str(i) ...: In [33]: def xun(a): ...: print "b...原创 2019-05-21 22:07:27 · 2523 阅读 · 0 评论 -
"python setup.py egg_info" failed with error code 1---更新setuptools再重新install
Collecting gevent==1.4.0 (from -r requirements.txt (line 17)) Downloading http://mirrors.xxxxx.com/pypi/packages/ed/27/6c49b70808f569b66ec7fac2e78f076e9b204db9cf5768740cff3d5a07ae/gevent-1.4.0.tar....原创 2019-06-18 21:37:21 · 1475 阅读 · 0 评论 -
python dict字典 items()和iteritems()多线程遍历
items()和iteritems()区别: 一、两个函数的作用 字典的items方法作用:是可以将字典中的所有项,以列表方式返回。因为字典是无序的,所以用items方法返回字典的所有项,也是没有顺序的。 字典的iteritems方法作用:与items方法相比作用大致相同,只是它的返回值不是列表,而是一个迭代器。 所以iteritems遍历的速度比items方法快 python dict字典循...原创 2019-06-04 21:59:25 · 1949 阅读 · 0 评论