summaryrefslogtreecommitdiff
path: root/Lib/xml/etree/ElementTree.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-10-09 11:16:26 -0400
committerBenjamin Peterson <benjamin@python.org>2012-10-09 11:16:26 -0400
commit455fa0a314b7f7edd0c8554b12a65267ff1e2e5b (patch)
treea4db0395d8674c1e3c4119f0edccf72307b34e49 /Lib/xml/etree/ElementTree.py
parentb29614e047110f4d9af993a6cdec4e3fb7ef9738 (diff)
parent831893a68ec7114c1fc9c8e36b9159f5c1db50c7 (diff)
downloadcpython-git-455fa0a314b7f7edd0c8554b12a65267ff1e2e5b.tar.gz
merge heads
Diffstat (limited to 'Lib/xml/etree/ElementTree.py')
-rw-r--r--Lib/xml/etree/ElementTree.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py
index b9d8df6ab9..9553c51f6c 100644
--- a/Lib/xml/etree/ElementTree.py
+++ b/Lib/xml/etree/ElementTree.py
@@ -303,7 +303,9 @@ class Element:
self._children.insert(index, element)
def _assert_is_element(self, e):
- if not isinstance(e, Element):
+ # Need to refer to the actual Python implementation, not the
+ # shadowing C implementation.
+ if not isinstance(e, _Element):
raise TypeError('expected an Element, not %s' % type(e).__name__)
##