Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ MyIndexAndInt
Class
MyIndexAndInt
Lib/test/test_capi/test_long.py:25–29 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
23
24
# use __index__(), not __int__()
25
class
MyIndexAndInt:
26
def
__index__(self):
27
return
10
28
def
__int__(self):
29
return
22
30
31
32
class
LongTests(unittest.TestCase):
Callers
3
check_long_asint
Method · 0.85
check_long_asintandoverflow
Method · 0.85
test_long_asdouble
Method · 0.85
Calls
no outgoing calls
Tested by
3
check_long_asint
Method · 0.68
check_long_asintandoverflow
Method · 0.68
test_long_asdouble
Method · 0.68
Used in the wild
real call sites across dependent graphs
searching dependent graphs…