Skip to content

Commit d819ab6

Browse files
committed
Document iselement behavior when used with types
1 parent c3fb864 commit d819ab6

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
@@ -611,8 +611,11 @@ Functions
611611

612612
.. function:: iselement(element)
613613

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

617620

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

0 commit comments

Comments
 (0)