MCPcopy Index your code
hub / github.com/pydata/xarray / _set

Method _set

xarray/core/treenode.py:565–572  ·  view source on GitHub ↗

Set the child node with the specified key to value. Counterpart to the public .get method, and also only works on the immediate node, not other nodes in the tree.

(self, key: str, val: Any)

Source from the content-addressed store, hash-verified

563 return current_node
564
565 def _set(self, key: str, val: Any) -> None:
566 """
567 Set the child node with the specified key to value.
568
569 Counterpart to the public .get method, and also only works on the immediate node, not other nodes in the tree.
570 """
571 new_children = {**self.children, key: val}
572 self.children = new_children
573
574 def _set_item(
575 self,

Callers 2

_copy_subtreeMethod · 0.45
_set_itemMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected