[lxml] Re: lxml memory allocation failed

2022-05-01 Thread Adrian Bool
Hi Martin, > On 30 Apr 2022, at 21:35, Martin Mueller > wrote: > >for elem in elem: > sort_and_indent(elem, level + 1) I'd never write the above code — i.e. using the same variable name for the for loop's iterator as it's input. The ambiguity of what the "elem" variable

[lxml] Re: lxml memory allocation failed

2022-05-01 Thread Charlie Clark
On 30 Apr 2022, at 22:35, Martin Mueller wrote: > When I reported that problem at an earlier time, I think that Stefan advised > me to introduce some step that would clear memory after each single text. How are you reading the source file? If it really is a large file then you could do worse th