summaryrefslogtreecommitdiffstats
path: root/Lib/_collections_abc.py
diff options
context:
space:
mode:
authorDennis Sweeney <36520290+sweeneyde@users.noreply.github.com>2021-07-21 23:49:03 (GMT)
committerGitHub <noreply@github.com>2021-07-21 23:49:03 (GMT)
commitc878f5d81772dc6f718d6608c78baa4be9a4f176 (patch)
treee0cb481a646370ab2f18eae81d27d81252148edc /Lib/_collections_abc.py
parentab7fcc8fbdc11091370deeb000a787fb02f9b13d (diff)
downloadcpython-c878f5d81772dc6f718d6608c78baa4be9a4f176.zip
cpython-c878f5d81772dc6f718d6608c78baa4be9a4f176.tar.gz
cpython-c878f5d81772dc6f718d6608c78baa4be9a4f176.tar.bz2
bpo-44704: Make Set._hash consistent with frozenset.__hash__ (GH-27281)
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 d92b848..bff58ad 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: