]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fixups to the hash function for frozensets.
authorRaymond Hettinger <python@rcn.com>
Thu, 10 Jun 2004 21:38:41 +0000 (21:38 +0000)
committerRaymond Hettinger <python@rcn.com>
Thu, 10 Jun 2004 21:38:41 +0000 (21:38 +0000)
commit27e403ebe914294d307348d2b83c39f96059e133
tree418e9e758aa28a8458564a140063f70d6c2acec1
parent57c2d930f688ca50248241919bd815c85bf39939
Fixups to the hash function for frozensets.

* Non-zero initial value so that hash(frozenset()) != hash(0).
* Final permutation to differentiate nested sets.
* Add logic to make sure that -1 is not a possible hash value.
Objects/setobject.c