I was confused by the text saying that read_events "iterated", since it
actually returns an iterator (that's what a generator does) that the
caller must then iterate. So I tidied up the language. I'm not sure
what the sentence "Events provided in a previous call to read_events()
will not be yielded again." is trying to convey, so I didn't try to fix that.
Also fixed a couple more news items.
Also added versionadded for for fish/csh, fixed indentation of versionadded
for ElementTree.write, and make the behavior of shelf as a context manager
explicit in the docs.
- this was an internal implementation detail for iterparse
- this has been changed to use a new private method instead
- XMLPullParser.close docs are now more explicit about not
returning a root element and instead direct users towards
read_events
- also added missing docstrings and clarified some details
related to exactly *when* events are consumed from the
internal queue
(Initial patch by Stefan Behnel)
The new names are hopefully more descriptive and consistent. If you feel you
don't agree with this change, *please* read issue 17741 first - there's a lot of
discussion in there.
Using ``method`` markup because the method is on a callback object, not an
explicitly documented method. :meth: markup creates links within the current
class which is incorrect.
In addition, indent the paragraph correctly.
The return value of close() is not always a toplevel element. It depends on
what the underlying target returns. By default, TreeBuilder returns the
toplevel document element.
serialization functions - short_empty_elements. It controls how elements
without contents are emitted.
Patch by Serhiy Storchaka. Feature initially proposed by Ariel Poliak.
Removed the useless explanation of the Element data structure that started the
documentation page. Instead, the documentation now starts with a brief tutorial
skimming some of the capabilities of the module. The tutorial can be followed
by additional topic-specific sections (such as XPath support), and eventually
by a reference that goes over the module's classes and functions, as usual.
append, extend and insert now consistently type-check their argument in both
the C and Python implementations, and raise TypeError for non-Element
argument.
Added tests