Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ MyIndexable
Class
MyIndexable
Lib/test/test_math.py:234–239 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
232
233
# Class providing an __index__ method.
234
class
MyIndexable(object):
235
def
__init__(self, value):
236
self.value = value
237
238
def
__index__(self):
239
return
self.value
240
241
class
BadDescr:
242
def
__get__(self, obj, objtype=None):
Callers
4
testGcd
Method · 0.70
test_lcm
Method · 0.70
testPerm
Method · 0.70
testComb
Method · 0.70
Calls
no outgoing calls
Tested by
4
testGcd
Method · 0.56
test_lcm
Method · 0.56
testPerm
Method · 0.56
testComb
Method · 0.56