one*_*elf 79 python python-2.x
我希望Python的key方法返回一个集合而不是列表.因为它最类似于hashmap的键所提供的保证.具体来说,它们是唯一的,没有排序,就像一组.但是,此方法返回一个列表:
>>> d = {}
>>> d.keys().__class__
<type 'list'>
Run Code Online (Sandbox Code Playgroud)
这只是Python API中的一个错误,还是有其他原因让我失踪?
| 归档时间: |
|
| 查看次数: |
38687 次 |
| 最近记录: |