[lxml-dev] Does etree.iter() handle the refcount properly?
Stefan Behnel
stefan_ml at behnel.de
Mon Jul 7 10:05:11 CEST 2008
Hi,
Andrew Wang wrote:
> I just started using lxml and I ran into an odd problem. I'm using
> version 2.0.4-14 from the OpenSuSE repositories.
>
> import lxml.etree as etree
>
> # test.py
> xml = '''\
> <?xml version="1.0"?>
> <xml/>'''
>
> for i in range(10000):
> et = etree.fromstring(xml)
> for el in et.iter():
> pass
>
> $ python test.py
> Fatal Python error: deallocating None
> Aborted
>
> Is this a bug, or am I using etree.iter() incorrectly?
Works for me in the latest version.
Stefan
More information about the lxml-dev
mailing list