Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ Z
Class
Z
Lib/test/test_builtin.py:1238–1240 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1236
return
2**100
1237
self.assertEqual(type(hash(X())), int)
1238
class
Z(int):
1239
def
__hash__(self):
1240
return
self
1241
self.assertEqual(hash(Z(42)), hash(42))
1242
1243
def
test_invalid_hash_typeerror(self):
Callers
1
test_hash
Method · 0.70
Calls
no outgoing calls
Tested by
1
test_hash
Method · 0.56