update_nodes#
- NodeTree.update_nodes(update_dict: Dict[Union[Node, str], Dict[str, Any]], *, add: bool = False, raise_for_invalid_node: bool = True) None [source]#
Update multiple nodes in the NodeTree.
Similar to
update_node()
but for multiple elements that are represented as a dict.- Parameters:
update_dict (Dict[Union[Node, str], Dict[str, Any]]) – Dictionary with node as keys and entries that will be updated as values.
add (bool) – Flag a non-existing node should be added (default = False).
raise_for_invalid_node (bool) –
If set to True, when add is False and the node(s) are invalid/nonexistent, an error is raised.
Otherwise will issue a warning and continue adding the valid nodes.
New in version 0.3.4.
- Raises:
KeyError – If node does not exist and the
add
flag is not set- Return type:
None