Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ WithIndex
Class
WithIndex
Lib/test/test_complex.py:27–31 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
25
)
26
27
class
WithIndex:
28
def
__init__(self, value):
29
self.value = value
30
def
__index__(self):
31
return
self.value
32
33
class
WithFloat:
34
def
__init__(self, value):
Callers
2
test_constructor
Method · 0.85
test_from_number
Method · 0.85
Calls
no outgoing calls
Tested by
2
test_constructor
Method · 0.68
test_from_number
Method · 0.68
Used in the wild
real call sites across dependent graphs
searching dependent graphs…