MCPcopy Create free account
hub / github.com/rthalley/dnspython / clone

Method clone

dns/btree.py:365–371  ·  view source on GitHub ↗

Make a shallow-copy duplicate of this node.

(self, creator: _Creator)

Source from the content-addressed store, hash-verified

363 return None
364
365 def clone(self, creator: _Creator) -> "_Node[KT, ET]":
366 """Make a shallow-copy duplicate of this node."""
367 cloned = self.__class__(self.t, creator, self.is_leaf)
368 cloned.elts.extend(self.elts)
369 if not self.is_leaf:
370 cloned.children.extend(self.children)
371 return cloned
372
373 def __str__(self): # pragma: no cover
374 if not self.is_leaf:

Callers 1

maybe_cowMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected