Stefan Behnel added the comment: > Add all the element methods to the elementtree object.
Ok, but why? An ElementTree object *is not* an Element. It's a representation of a document that *has* a root Element. It makes sense for a document to allow searches over its content, and the ElementTree class currently supports that, using the find*() or iter() methods. They are "deep" or "global" content accessor shortcuts, in addition to the path through the normal getroot() method. But I can't see how making ElementTree objects look and behave like their own root Element improves anything. Instead, it would just make the distinction between the two completely unclear, and would also lead to quirks like the question why iterating over a document yields the second level of children. Or the question what the "attrib" property of a document could mean. Instead of blurring it, would you have an idea what we could improve in the documentation to make this distinction clearer? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21028> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com