Remove this node from the hierarchy. If the node has children, recursive removal must be stated by giving recursive a true value; otherwise, a NodeError will be raised. If the node is a link to a Group object, and you are sure that you want to delete it, you can do
(self, recursive: bool = False, force: bool = False)
| 525 | self._g_delete(parent) |
| 526 | |
| 527 | def _f_remove(self, recursive: bool = False, force: bool = False) -> None: |
| 528 | """Remove this node from the hierarchy. |
| 529 | |
| 530 | If the node has children, recursive removal must be stated by giving |
| 531 | recursive a true value; otherwise, a NodeError will be raised. |
| 532 | |
| 533 | If the node is a link to a Group object, and you are sure that you want |
| 534 | to delete it, you can do this by setting the force flag to true. |
| 535 | |
| 536 | """ |
| 537 | self._g_check_open() |
| 538 | file_ = self._v_file |
| 539 | file_._check_writable() |
| 540 | |
| 541 | if file_.is_undo_enabled(): |
| 542 | self._g_remove_and_log(recursive, force) |
| 543 | else: |
| 544 | self._g_remove(recursive, force) |
| 545 | |
| 546 | def _g_remove_and_log(self, recursive: bool, force: bool) -> None: |
| 547 | file_ = self._v_file |