Eric V. Smith <e...@trueblade.com> added the comment:
I assume that ElementTree doesn't support mutation while iterating. However, the docs at https://docs.python.org/3/library/xml.etree.elementtree.html#modifying-an-xml-file show removing an item while iterating. It probably only works because the child being removed is the last one. ---------- nosy: +eric.smith _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41892> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com