CADETProcess.dataStructure.nested_dict.set_nested_value

CADETProcess.dataStructure.nested_dict.set_nested_value#

CADETProcess.dataStructure.nested_dict.set_nested_value(nested_dict: dict[str, Any], path: str | list, value: Any) None[source]#

Set a value in a nested dictionary using a dot-separated path.

Parameters:
nested_dictdict

dictionary to update.

pathstr or list

Path to the key in dot notation (string) or as a list of keys.

valueAny

Value to set.

Raises:
KeyError

If an intermediate key in the path does not exist.