]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-93607: document `root` attribute of `iterparse` (GH-99410) (#111556)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 31 Oct 2023 16:24:41 +0000 (17:24 +0100)
committerGitHub <noreply@github.com>
Tue, 31 Oct 2023 16:24:41 +0000 (16:24 +0000)
Co-authored-by: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Doc/library/xml.etree.elementtree.rst

index 7fd4c7a4a5da2ba489e705b6345f1c18f9381781..31135a7e613c9768fb4c68ec7ad9a8903597bacb 100644 (file)
@@ -622,7 +622,9 @@ Functions
    *parser* is an optional parser instance.  If not given, the standard
    :class:`XMLParser` parser is used.  *parser* must be a subclass of
    :class:`XMLParser` and can only use the default :class:`TreeBuilder` as a
-   target.  Returns an :term:`iterator` providing ``(event, elem)`` pairs.
+   target. Returns an :term:`iterator` providing ``(event, elem)`` pairs;
+   it has a ``root`` attribute that references the root element of the
+   resulting XML tree once *source* is fully read.
 
    Note that while :func:`iterparse` builds the tree incrementally, it issues
    blocking reads on *source* (or the file it names).  As such, it's unsuitable