Skip to content

Commit 1d2f0d9

Browse files
committed
Revert iselement to previous state
1 parent 84b22d4 commit 1d2f0d9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Lib/xml/etree/ElementTree.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ class ParseError(SyntaxError):
120120

121121
def iselement(element):
122122
"""Return True if *element* appears to be an Element."""
123-
return (hasattr(element, 'tag') and hasattr(element, 'text') and
124-
hasattr(element, 'tail') and callable(element.iter) and
125-
callable(element.items) and callable(element.__len__))
123+
return hasattr(element, 'tag')
126124

127125
class Element:
128126
"""An XML element.

0 commit comments

Comments
 (0)