MCPcopy 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__()
25class MyIndexAndInt:
26 def __index__(self):
27 return 10
28 def __int__(self):
29 return 22
30
31
32class LongTests(unittest.TestCase):

Callers 3

check_long_asintMethod · 0.85
test_long_asdoubleMethod · 0.85

Calls

no outgoing calls

Tested by 3

check_long_asintMethod · 0.68
test_long_asdoubleMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…