Remove the object node *name* under *where* location. Parameters ---------- where, name These arguments work as in :meth:`File.get_node`, referencing the node to be acted upon. recursive : bool If not supplied or false, the node wi
(
self,
where: Node | str,
name: str | None = None,
recursive: bool = False,
)
| 1963 | ) |
| 1964 | |
| 1965 | def remove_node( |
| 1966 | self, |
| 1967 | where: Node | str, |
| 1968 | name: str | None = None, |
| 1969 | recursive: bool = False, |
| 1970 | ) -> None: |
| 1971 | """Remove the object node *name* under *where* location. |
| 1972 | |
| 1973 | Parameters |
| 1974 | ---------- |
| 1975 | where, name |
| 1976 | These arguments work as in |
| 1977 | :meth:`File.get_node`, referencing the node to be acted upon. |
| 1978 | recursive : bool |
| 1979 | If not supplied or false, the node will be removed |
| 1980 | only if it has no children; if it does, a |
| 1981 | NodeError will be raised. If supplied |
| 1982 | with a true value, the node and all its descendants will be |
| 1983 | completely removed. |
| 1984 | |
| 1985 | """ |
| 1986 | obj = self.get_node(where, name=name) |
| 1987 | obj._f_remove(recursive) |
| 1988 | |
| 1989 | def get_node_attr( |
| 1990 | self, where: Node | str, attrname: str, name: str | None = None |