Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ab2a76c

Browse files
committed
Update ET documentation reprhasing the mention of the new IncrementalParser in
the doc for iterparse.
1 parent bf05df2 commit ab2a76c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Doc/library/xml.etree.elementtree.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,11 @@ Functions
387387
:class:`XMLParser` parser is used. Returns an :term:`iterator` providing
388388
``(event, elem)`` pairs.
389389

390+
Note that while :func:`iterparse` builds the tree incrementally, it issues
391+
blocking reads on *source* (or the file it names). As such, it's unsuitable
392+
for asynchronous applications where blocking reads can't be made. For fully
393+
asynchronous parsing, see :class:`IncrementalParser`.
394+
390395
.. note::
391396

392397
:func:`iterparse` only guarantees that it has seen the ">"
@@ -397,10 +402,6 @@ Functions
397402

398403
If you need a fully populated element, look for "end" events instead.
399404

400-
.. note::
401-
For real event-driven parsing, see :class:`IncrementalParser`.
402-
403-
404405
.. function:: parse(source, parser=None)
405406

406407
Parses an XML section into an element tree. *source* is a filename or file

0 commit comments

Comments
 (0)