New submission from Peter Harris:

Documentation on python website says:

    xml.etree.ElementTree.iterparse(source, events=None, parser=None)
Parses an XML section into an element tree incrementally, and reports what’s 
going on to the user. source is a filename or file object containing XML data. 
events is a list of events to report back.

But 'events' must be a *tuple* or iterparse raises "TypeError: invalid event 
tuple"

Possibly also worth explaining that "start-ns" event is accompanied by a tuple 
of (namespace, url) rather than an element from the XML document. Currently the 
description just says "ns events are used to get detailed namespace 
information" but doesn't say how or give an example.

----------
assignee: docs@python
components: Documentation
messages: 201734
nosy: Peter.Harris, docs@python
priority: normal
severity: normal
status: open
title: ElementTree iterparse documentation
versions: Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19452>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to