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

Class H

Lib/test/test_set.py:304–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302 def test_subclass_with_custom_hash(self):
303 # Bug #1257731
304 class H(self.thetype):
305 def __hash__(self):
306 return int(id(self) & 0x7fffffff)
307 s=H()
308 f=set()
309 f.add(s)

Callers 6

test_md5_algorithmMethod · 0.70
test_sha_algorithmMethod · 0.70
test_sha256_algorithmMethod · 0.70
get_authorizationMethod · 0.50
get_algorithm_implsMethod · 0.50

Calls

no outgoing calls

Tested by 4

test_md5_algorithmMethod · 0.56
test_sha_algorithmMethod · 0.56
test_sha256_algorithmMethod · 0.56