MCPcopy Index your code
hub / github.com/RustPython/RustPython / Indexable

Class Indexable

extra_tests/snippets/stdlib_struct.py:51–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51class Indexable(object):
52 def __init__(self, value):
53 self._value = value
54
55 def __index__(self):
56 return self._value
57
58
59data = struct.pack("B", Indexable(65))

Callers 1

stdlib_struct.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected