[Python-checkins] cpython: Update ET documentation reprhasing the mention of the new IncrementalParser in

eli.bendersky python-checkins at python.org
Sat Apr 20 14:56:44 CEST 2013


http://hg.python.org/cpython/rev/c1037a55028b
changeset:   83460:c1037a55028b
user:        Eli Bendersky <eliben at gmail.com>
date:        Sat Apr 20 05:53:50 2013 -0700
summary:
  Update ET documentation reprhasing the mention of the new IncrementalParser in
the doc for iterparse.

files:
  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
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -387,6 +387,11 @@
    :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 @@
 
       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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list