From 8e95ae3442030b7620b6ebde9ec83663170fc0e6 Mon Sep 17 00:00:00 2001 From: Prometheus3375 Date: Wed, 8 Jun 2022 19:48:12 +0300 Subject: [PATCH 1/2] Document root attribute of iterparse --- Doc/library/xml.etree.elementtree.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index 2fe0d2e082fb3a0..ab0d3b6e31dbb7a 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -627,6 +627,9 @@ Functions blocking reads on *source* (or the file it names). As such, it's unsuitable for applications where blocking reads can't be made. For fully non-blocking parsing, see :class:`XMLPullParser`. + + Once *source* is fully read, the returned :term:`iterator` object is populated with `root` + attribute which references to the root element of the resulting XML tree. .. note:: From 5a32200d72729fc90f35b9de288710b30b3dbab1 Mon Sep 17 00:00:00 2001 From: Prometheus3375 Date: Thu, 9 Jun 2022 19:46:15 +0300 Subject: [PATCH 2/2] Fix root formatting --- Doc/library/xml.etree.elementtree.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index ab0d3b6e31dbb7a..cf5a0ea43c5ac81 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -628,7 +628,7 @@ Functions for applications where blocking reads can't be made. For fully non-blocking parsing, see :class:`XMLPullParser`. - Once *source* is fully read, the returned :term:`iterator` object is populated with `root` + Once *source* is fully read, the returned :term:`iterator` object is populated with a ``root`` attribute which references to the root element of the resulting XML tree. .. note::