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

Method make_from

src/pointers/base_pointers.py:254–267  ·  view source on GitHub ↗

Create a new instance of the pointer. Args: obj: Object to create pointer to. Returns: Created pointer. Example: ```py ptr = Pointer.make_from(1) ```

(cls, obj: T)

Source from the content-addressed store, hash-verified

252 @classmethod
253 @abstractmethod
254 def make_from(cls, obj: T) -> "BaseObjectPointer[T]":
255 """Create a new instance of the pointer.
256
257 Args:
258 obj: Object to create pointer to.
259
260 Returns:
261 Created pointer.
262
263 Example:
264 ```py
265 ptr = Pointer.make_from(1)
266 ```"""
267 ...
268
269 @classmethod
270 def _get_ptr(cls, obj: Union[T, "BasePointer[T]"]) -> "BasePointer[T]":

Callers 1

_get_ptrMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected