mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
bpo-44704: Make Set._hash consistent with frozenset.__hash__ (GH-27281) (GH-27282)
This commit is contained in:
parent
d17449f31d
commit
4194f1465f
3 changed files with 14 additions and 0 deletions
|
|
@ -696,6 +696,7 @@ def _hash(self):
|
|||
hx = hash(x)
|
||||
h ^= (hx ^ (hx << 16) ^ 89869747) * 3644798167
|
||||
h &= MASK
|
||||
h ^= (h >> 11) ^ (h >> 25)
|
||||
h = h * 69069 + 907133923
|
||||
h &= MASK
|
||||
if h > MAX:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue