MCPcopy Index your code
hub / github.com/python/cpython / MyIndexable

Class MyIndexable

Lib/test/test_math.py:185–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183
184# Class providing an __index__ method.
185class MyIndexable(object):
186 def __init__(self, value):
187 self.value = value
188
189 def __index__(self):
190 return self.value
191
192class IndexableFloatLike:
193 def __init__(self, float_value, index_value):

Callers 5

testGcdMethod · 0.70
test_lcmMethod · 0.70
testLogMethod · 0.70
testLog2Method · 0.70
testLog10Method · 0.70

Calls

no outgoing calls

Tested by 5

testGcdMethod · 0.56
test_lcmMethod · 0.56
testLogMethod · 0.56
testLog2Method · 0.56
testLog10Method · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…