Skip to content

Commit 90d09de

Browse files
committed
Document iselement behavior when used with types
1 parent 8a7b2d2 commit 90d09de

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Doc/library/xml.etree.elementtree.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,11 @@ Functions
610610

611611
.. function:: iselement(element)
612612

613-
Check if an object appears to be a valid element object. *element* is an
614-
element instance. Return ``True`` if this is an element object.
613+
Check if *element* appears to be a valid element object or type. Return
614+
``True`` if this is an element object or type.
615+
616+
Because ``iselement`` behaves identically for both objects and types, code
617+
requiring an object should check for this, see :func:`iselement`.
615618

616619

617620
.. function:: iterparse(source, events=None, parser=None)

0 commit comments

Comments
 (0)