Hash tables are supposed be high-performance mappings,and because Python dicts are implemented with hash tables,它們也具有很高的性能。但是在查看負整數的散列值時,我遇到了一個奇怪的結果。 >>> for i in range(7):
... print hash(i-4)
...
我在第一眼看Python wikibook的python語言。 對於下文中提到的套 - We can also have a loop move over each of the items in a set. However, since sets are unordered, it is undefined which order the iteration will follow. 並給出了