MCPcopy
hub / github.com/hylang/hy / replace

Method replace

hy/models.py:419–429  ·  view source on GitHub ↗
(self, other, recursive=True)

Source from the content-addressed store, hash-verified

417 _extra_kwargs = ()
418
419 def replace(self, other, recursive=True):
420 return (
421 Object.replace(
422 Object.replace(
423 type(self)(
424 (replace_hy_obj(x, other) for x in self),
425 **{k: getattr(self, k) for k in self._extra_kwargs}),
426 self),
427 other)
428 if recursive
429 else Object.replace(self, other))
430
431 def __add__(self, other):
432 return self.__class__(

Callers

nothing calls this directly

Calls 2

replace_hy_objFunction · 0.85
replaceMethod · 0.45

Tested by

no test coverage detected