diff options
author | Eli Bendersky <eliben@gmail.com> | 2013-04-20 12:53:50 (GMT) |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2013-04-20 12:53:50 (GMT) |
commit | ab2a76c8a823941e01a5a672fc7da021df0b6f68 (patch) | |
tree | b1820bd0c6918078ac5367cc1892e64b9224b7ac | |
parent | bf05df239611ddb25be47ce60358f10992eba4f9 (diff) | |
download | cpython-ab2a76c8a823941e01a5a672fc7da021df0b6f68.zip cpython-ab2a76c8a823941e01a5a672fc7da021df0b6f68.tar.gz cpython-ab2a76c8a823941e01a5a672fc7da021df0b6f68.tar.bz2 |
Update ET documentation reprhasing the mention of the new IncrementalParser in
the doc for iterparse.
-rw-r--r-- | Doc/library/xml.etree.elementtree.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index da03764..07ace48 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -387,6 +387,11 @@ Functions :class:`XMLParser` parser is used. Returns an :term:`iterator` providing ``(event, elem)`` pairs. + 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 + for asynchronous applications where blocking reads can't be made. For fully + asynchronous parsing, see :class:`IncrementalParser`. + .. note:: :func:`iterparse` only guarantees that it has seen the ">" @@ -397,10 +402,6 @@ Functions If you need a fully populated element, look for "end" events instead. - .. note:: - For real event-driven parsing, see :class:`IncrementalParser`. - - .. function:: parse(source, parser=None) Parses an XML section into an element tree. *source* is a filename or file |