[New-bugs-announce] [issue44704] frozenset.__hash__ vs. Set._hash
Svyatoslav
report at bugs.python.org
Wed Jul 21 17:32:14 EDT 2021
New submission from Svyatoslav <prometheus3375 at gmail.com>:
In docstring of Set._hash in _collections_abc.py is written:
"We match the algorithm used by the built-in frozenset type."
But
>>> s = frozenset({i for i in range(10)})
>>> hash(s)
3895031357313128696
>>> Set._hash(s)
3914343279946282847
Looks like Set._hash is different.
----------
components: Library (Lib)
messages: 397963
nosy: Prometheus3375
priority: normal
severity: normal
status: open
title: frozenset.__hash__ vs. Set._hash
type: behavior
versions: Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44704>
_______________________________________
More information about the New-bugs-announce
mailing list