12 Sep
2005
12 Sep
'05
5:53 p.m.
Kieran Holland wrote:
Thanks for lxml - very nice.
Unfortunately the following fragment causes my python interpreter to crash and burn:
---------------- from lxml import etree
root = etree.fromstring('<html><p></p>x</html>') for elem in root: elem.tail = '' -----------------
Thanks for reporting this! I have identified a bug in the iteration implementation that I need to think about a bit more. Basically the iterator now retains the next node iteration too long, and changing the text tree structure can break this assumption, causing the system to iterate off into now non-existent space. Regards, Martijn