Serhiy Storchaka added the comment:
The built-in ElementTree package is derived from lxml.etree. I suppose that the
documentation is inherited from lxml.etree.
The built-in ElementTree package supports duck typing. The element object is
not always an instance of the Element class. iselement() is not equal to
isinstance(e, Element), it just tests the existence of the tag attribute. Many
ElementTree functions have fast path for Element, but work with duck typed
classes too. I believe that in particular you can mix Python and C
implementations of Element and lxml.etree elements in one tree.
Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list