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

Class MyIndexable

Lib/test/test_math_integer.py:11–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10# Class providing an __index__ method.
11class MyIndexable(object):
12 def __init__(self, value):
13 self.value = value
14
15 def __index__(self):
16 return self.value
17
18# Here's a pure Python version of the math.integer.factorial algorithm, for
19# documentation and comparison purposes.

Callers 6

test_factorialMethod · 0.70
test_gcdMethod · 0.70
test_lcmMethod · 0.70
test_isqrtMethod · 0.70
test_permMethod · 0.70
test_combMethod · 0.70

Calls

no outgoing calls

Tested by 6

test_factorialMethod · 0.56
test_gcdMethod · 0.56
test_lcmMethod · 0.56
test_isqrtMethod · 0.56
test_permMethod · 0.56
test_combMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…