MCPcopy Create free account
hub / github.com/apache/tvm-ffi / __replace__

Function __replace__

python/tvm_ffi/_dunder.py:202–207  ·  view source on GitHub ↗
(self: Any, **kwargs: Any)

Source from the content-addressed store, hash-verified

200 copy_copy = copy.copy
201
202 def __replace__(self: Any, **kwargs: Any) -> Any:
203 obj = copy_copy(self)
204 cls = type(obj)
205 for key, value in kwargs.items():
206 getattr(cls, key).set(obj, value)
207 return obj
208
209 return __replace__
210

Callers

nothing calls this directly

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected