This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alexprengere
Recipients alexprengere
Date 2021-03-04.15:59:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This issue is only visible when the C accelerator of ElementTree is *not* used. It is the counterpart of the following issue on PyPy3:

 >>> from xml.etree.ElementTree import Element
 >>> r = Element("root")
 >>> r.extend((Element(str(i)) for i in range(3)))
 >>> print(list(r))

When using the C accelerator, the list is not empty, as expected. In the Python code, a check on the input empties the input iterator.

The fix is trivial (one-line change), so if you are interested I could open a PR, which would be my first, so a good occasion to go through the devguide ;)
I understand that since Python3.3 the C accelerator is used by default, so I would agree that this is not really a bug, and I can just fix it on PyPy side.
Date User Action Args
2021-03-04 15:59:21alexprengeresetrecipients: + alexprengere
2021-03-04 15:59:21alexprengeresetmessageid: <>
2021-03-04 15:59:21alexprengerelinkissue43399 messages
2021-03-04 15:59:21alexprengerecreate