summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-07-21 17:23:21 -0700
committerGitHub <noreply@github.com>2021-07-21 19:23:21 -0500
commit4194f1465fa85371dcbead57a54bb06d1f0b97d9 (patch)
tree2b5d1054f052db9fa8da96c97c1697ce45d562b9 /Lib/_collections_abc.py
parentbpo-30511: Add note on thread safety to shutil.make_archive() (GH-26933) (GH-... (diff)
downloadcpython-4194f1465fa85371dcbead57a54bb06d1f0b97d9.tar.gz
cpython-4194f1465fa85371dcbead57a54bb06d1f0b97d9.tar.bz2
cpython-4194f1465fa85371dcbead57a54bb06d1f0b97d9.zip
bpo-44704: Make Set._hash consistent with frozenset.__hash__ (GH-27281) (GH-27282)
Diffstat (limited to 'Lib/_collections_abc.py')
-rw-r--r--Lib/_collections_abc.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py
index d92b848e943..bff58ad4a7f 100644
--- a/Lib/_collections_abc.py
+++ b/Lib/_collections_abc.py
@@ -696,6 +696,7 @@ class Set(Collection):
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: