[docs] Add docstrings for ElementTree module (issue 16954)
ezio.melotti at gmail.com
ezio.melotti at gmail.com
Wed Feb 20 19:55:42 CET 2013
http://bugs.python.org/review/16954/diff/7390/Lib/xml/etree/ElementTree.py
File Lib/xml/etree/ElementTree.py (right):
http://bugs.python.org/review/16954/diff/7390/Lib/xml/etree/ElementTree.py#newcode1
Lib/xml/etree/ElementTree.py:1: """Lightweight XML support for Python
2.3 and later.
The "2.3 and later" part should be removed.
http://bugs.python.org/review/16954/diff/7390/Lib/xml/etree/ElementTree.py#newcode27
Lib/xml/etree/ElementTree.py:27: And a number of child elements stored
in a Python sequence.
Is this 'children'?
http://bugs.python.org/review/16954/diff/7390/Lib/xml/etree/ElementTree.py#newcode157
Lib/xml/etree/ElementTree.py:157: bytestrings or Unicode strings. 'tag'
is the element name. 'attrib' is
I thinks this should be 'ASCII-only byte strings', but I haven't tested
it.
http://bugs.python.org/review/16954/diff/7390/Lib/xml/etree/ElementTree.py#newcode159
Lib/xml/etree/ElementTree.py:159: contains additional element attributes
given as keyword arguments.
This paragraph could be moved to the constructor docstring, and here the
attributes could be simply listed.
http://bugs.python.org/review/16954/diff/7390/Lib/xml/etree/ElementTree.py#newcode189
Lib/xml/etree/ElementTree.py:189: def __init__(self, tag, attrib={},
**extra):
This should probably be documented.
http://bugs.python.org/review/16954/diff/7390/Lib/xml/etree/ElementTree.py#newcode215
Lib/xml/etree/ElementTree.py:215: # (Experimental)
I would keep this in the docstring, or remove it altogether if it's
outdated.
http://bugs.python.org/review/16954/
More information about the docs
mailing list