Skip to content

Commit 71e138d

Browse files
miss-islingtonPrometheus3375slatenyhugovk
authored
[3.12] gh-93607: document root attribute of iterparse (GH-99410) (#111555)
Co-authored-by: Prometheus3375 <[email protected]> Co-authored-by: Stanley <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent c21387c commit 71e138d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/xml.etree.elementtree.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,9 @@ Functions
622622
*parser* is an optional parser instance. If not given, the standard
623623
:class:`XMLParser` parser is used. *parser* must be a subclass of
624624
:class:`XMLParser` and can only use the default :class:`TreeBuilder` as a
625-
target. Returns an :term:`iterator` providing ``(event, elem)`` pairs.
625+
target. Returns an :term:`iterator` providing ``(event, elem)`` pairs;
626+
it has a ``root`` attribute that references the root element of the
627+
resulting XML tree once *source* is fully read.
626628

627629
Note that while :func:`iterparse` builds the tree incrementally, it issues
628630
blocking reads on *source* (or the file it names). As such, it's unsuitable

0 commit comments

Comments
 (0)