Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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_algorithm
Method · 0.70
test_sha_algorithm
Method · 0.70
test_sha256_algorithm
Method · 0.70
test_subclass_with_custom_hash
Method · 0.70
get_authorization
Method · 0.50
get_algorithm_impls
Method · 0.50
Calls
no outgoing calls
Tested by
4
test_md5_algorithm
Method · 0.56
test_sha_algorithm
Method · 0.56
test_sha256_algorithm
Method · 0.56
test_subclass_with_custom_hash
Method · 0.56