Message388099
This issue is only visible when the C accelerator of ElementTree is *not* used. It is the counterpart of the following issue on PyPy3: https://foss.heptapod.net/pypy/pypy/-/issues/3181
>>> 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:21 | alexprengere | set | recipients:
+ alexprengere |
2021-03-04 15:59:21 | alexprengere | set | messageid: <1614873561.76.0.875762243403.issue43399@roundup.psfhosted.org> |
2021-03-04 15:59:21 | alexprengere | link | issue43399 messages |
2021-03-04 15:59:21 | alexprengere | create | |
|