MCPcopy Index your code
hub / github.com/python/cpython / H

Class H

Lib/test/test_weakset.py:181–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179 def test_subclass_with_custom_hash(self):
180 # Bug #1257731
181 class H(WeakSet):
182 def __hash__(self):
183 return int(id(self) & 0x7fffffff)
184 s=H()
185 f=set()
186 f.add(s)

Callers 1

Calls

no outgoing calls

Tested by 1