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

Method __setitem__

src/pointers/malloc.py:98–105  ·  view source on GitHub ↗
(self, index: int, value: T)

Source from the content-addressed store, hash-verified

96
97 @handle
98 def __setitem__(self, index: int, value: T) -> None:
99 if not isinstance(index, int):
100 raise ValueError(
101 f"memory indices must be int, not {type(index).__name__}",
102 )
103
104 ptr = self._indexed(index)
105 ptr <<= value
106
107
108def malloc(size: int) -> AllocatedPointer[Any]:

Callers

nothing calls this directly

Calls 1

_indexedMethod · 0.95

Tested by

no test coverage detected