Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ Index
Class
Index
Lib/test/test_capi/test_long.py:17–22 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
15
pass
16
17
class
Index:
18
def
__init__(self, value):
19
self.value = value
20
21
def
__index__(self):
22
return
self.value
23
24
# use __index__(), not __int__()
25
class
MyIndexAndInt:
Callers
9
check_long_asint
Method · 0.70
check_long_asintandoverflow
Method · 0.70
test_long_asdouble
Method · 0.70
test_long_asvoidptr
Method · 0.70
test_long_asnativebytes
Method · 0.70
test_long_getsign
Method · 0.70
test_long_ispositive
Method · 0.70
test_long_isnegative
Method · 0.70
test_long_iszero
Method · 0.70
Calls
no outgoing calls
Tested by
9
check_long_asint
Method · 0.56
check_long_asintandoverflow
Method · 0.56
test_long_asdouble
Method · 0.56
test_long_asvoidptr
Method · 0.56
test_long_asnativebytes
Method · 0.56
test_long_getsign
Method · 0.56
test_long_ispositive
Method · 0.56
test_long_isnegative
Method · 0.56
test_long_iszero
Method · 0.56
Used in the wild
real call sites across dependent graphs
searching dependent graphs…