I agree that it shouldn't crash, but this is difficult to prevent and your usage example is explicitly forbidden in the docs.
http://lxml.de/parsing.html#modifying-the-tree
I agree that it shouldn't crash, but this is difficult to prevent and your usage example is explicitly forbidden in the docs.
http:// lxml.de/ parsing. html#modifying- the-tree