Remove a child node from this tree object.
(self, key: str)
| 647 | current_node._set(name, item) |
| 648 | |
| 649 | def __delitem__(self, key: str) -> None: |
| 650 | """Remove a child node from this tree object.""" |
| 651 | if key in self.children: |
| 652 | child = self._children[key] |
| 653 | del self._children[key] |
| 654 | child.orphan() |
| 655 | else: |
| 656 | raise KeyError(key) |
| 657 | |
| 658 | def same_tree(self, other: Self) -> bool: |
| 659 | """True if other node is in the same tree as this node.""" |