Issue #30 open

Delete with deep = False

Sardar Yumatov
created an issue

Sometimes we need to delete the node leaving all children in place (inserting them at the parent's place). A .delete(deep = False) will be really useful in this case.

This is low-priority enhancement because we can manually move the subtree (N children queries) and then delete the parent. With deep = False this can be done more efficient.

Alternatively .delete_node(deep = True) method can implement this functionality, such that standard .delete() will call it with deep = True. This approach avoids introducing non-standard argument to .delete() (consistency)

Comments (5)

  1. Gustavo Picon repo owner
    • changed status to open

    I'm really liking this. And it wouldn't break current apps.

    I think we can include this in the next release, at least with a naive implementation. Ideally, it should have an efficient implementation (1-2 queries) for all trees (AL/MP/NS).

  2. Log in to comment