redbaron
redbaron copied to clipboard
Feature request: Add a node.remove() method
The pattern del x.parent[x.index_on_parent] doesn't work in all cases. Deleting a node is a common operation, so it would be really neat if node.remove() would do it. This could leave the parent block empty. Perhaps this would insert a 'pass' on removing the last node.