mirror of https://github.com/python/cpython.git
Issue #17902: Clarify doc of ElementTree.iterparse and IncrementalParser
Based on patch by Aaron Oakley
This commit is contained in:
commit
c4216ab92b
|
@ -416,7 +416,8 @@ Functions
|
||||||
and ``"end-ns"`` (the "ns" events are used to get detailed namespace
|
and ``"end-ns"`` (the "ns" events are used to get detailed namespace
|
||||||
information). If *events* is omitted, only ``"end"`` events are reported.
|
information). If *events* is omitted, only ``"end"`` events are reported.
|
||||||
*parser* is an optional parser instance. If not given, the standard
|
*parser* is an optional parser instance. If not given, the standard
|
||||||
:class:`XMLParser` parser is used. Returns an :term:`iterator` providing
|
:class:`XMLParser` parser is used. *parser* can only use the default
|
||||||
|
:class:`TreeBuilder` as a target. Returns an :term:`iterator` providing
|
||||||
``(event, elem)`` pairs.
|
``(event, elem)`` pairs.
|
||||||
|
|
||||||
Note that while :func:`iterparse` builds the tree incrementally, it issues
|
Note that while :func:`iterparse` builds the tree incrementally, it issues
|
||||||
|
@ -880,7 +881,7 @@ IncrementalParser Objects
|
||||||
events are used to get detailed namespace information). If *events* is
|
events are used to get detailed namespace information). If *events* is
|
||||||
omitted, only ``"end"`` events are reported. *parser* is an optional
|
omitted, only ``"end"`` events are reported. *parser* is an optional
|
||||||
parser instance. If not given, the standard :class:`XMLParser` parser is
|
parser instance. If not given, the standard :class:`XMLParser` parser is
|
||||||
used.
|
used. *parser* can only use the default :class:`TreeBuilder` as a target.
|
||||||
|
|
||||||
.. method:: data_received(data)
|
.. method:: data_received(data)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue