[docs] Add docstrings for ElementTree module (issue 16954)

ezio.melotti at gmail.com ezio.melotti at gmail.com
Thu Feb 21 11:23:27 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.
On 2013/02/20 23:47:06, eric.araujo wrote:
> Also “lightweight” is disputed, there was a python-dev thread and a
bug report
> that lead to the rst docs being edited.

Wasn't that minidom?

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.
On 2013/02/20 23:47:06, eric.araujo wrote:
> When a noun is used as adjective, it’s used in the singular.  “child
elements”
> is correct.

I was referring to the name of the attribute. (I'm not sure there's an
attribute with that name, but if there is we should be consistent.)

http://bugs.python.org/review/16954/diff/7390/Lib/xml/etree/ElementTree.py#newcode170
Lib/xml/etree/ElementTree.py:170: """Dictionary of the tag's
attributes."""
On 2013/02/20 23:47:06, eric.araujo wrote:
> s/tag/element/
> 
> A tag is the concrete bytes used to mark the beginning and end of an
element. 
> The thing/concept/object itself, with parent, children and attributes,
is an
> element.

While this is true and I agree it should be fixed, the  term 'tag' seems
to be misused elsewhere too.  For example the tag attribute/argument
refers to the name of the element.

http://bugs.python.org/review/16954/


More information about the docs mailing list