MCPcopy Create free account
hub / github.com/ZeroIntensity/pointers.py / __getitem__

Method __getitem__

src/pointers/malloc.py:89–95  ·  view source on GitHub ↗
(self, index: int)

Source from the content-addressed store, hash-verified

87
88 @handle
89 def __getitem__(self, index: int) -> AllocatedPointer[T]:
90 if not isinstance(index, int):
91 raise ValueError(
92 f"memory indices must be int, not {type(index).__name__}",
93 )
94
95 return self._indexed(index)
96
97 @handle
98 def __setitem__(self, index: int, value: T) -> None:

Callers

nothing calls this directly

Calls 1

_indexedMethod · 0.95

Tested by

no test coverage detected