由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - Watch out for list(dict.keys()) in Python 3 (zz)
相关主题
感觉用python的人,属于程序员中的文艺青年那类的Python:请问如何把list变成structured array。
看C码工写Python真是捉急BT实战
python要把@当作矩阵乘法算符求助:Wavelet 的 library (转载)
Java is backPython小问题
学python的一点小感觉哈python注释问题。
阅读scala中How to check if an object is null in python?
谁知道这个嵌套的Python if 是啥意思?怎样运行一个 Python script?
python 有什么好书可以读一读?Any Python book recommend: Entry level?
相关话题的讨论汇总
话题: python话题: watch话题: list话题: out话题: iterable
进入Programming版参与讨论
1 (共1页)
r****t
发帖数: 10904
1
http://blog.labix.org/2008/06/27/watch-out-for-listdictkeys-in-python-3
Watch out for list(dict.keys()) in Python 3
Gustavo Niemeyer
As everyone is probably aware by now, in Python 3 dict.keys(), dict.values()
and dict.items() will all return iterable views instead of lists. The
standard way being suggested to overcome the difference, when the original
behavior was actually intended, is to simply use list(dict.keys()). This
should be usually fine, but not in all cases.
One of the reasons why som
1 (共1页)
进入Programming版参与讨论
相关主题
Any Python book recommend: Entry level?学python的一点小感觉哈
谁能说说Perl, Python, Tcl各自的优缺点?主要应用场合?阅读scala中
Python矩阵一问谁知道这个嵌套的Python if 是啥意思?
python, picklepython 有什么好书可以读一读?
感觉用python的人,属于程序员中的文艺青年那类的Python:请问如何把list变成structured array。
看C码工写Python真是捉急BT实战
python要把@当作矩阵乘法算符求助:Wavelet 的 library (转载)
Java is backPython小问题
相关话题的讨论汇总
话题: python话题: watch话题: list话题: out话题: iterable