Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Doc/library/xml.etree.elementtree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,11 @@ Functions

.. function:: iselement(element)

Check if an object appears to be a valid element object. *element* is an
element instance. Return ``True`` if this is an element object.
Check if *element* appears to be a valid element object or type. Return
``True`` if this is an element object or type.

Because ``iselement`` behaves identically for both objects and types, code
requiring an object should check for this, see :func:`isinstance`.


.. function:: iterparse(source, events=None, parser=None)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Document that :func:`xml.etree.ElementTree.iselement` works identically on
both object instances and types.
Loading