diff emeraldtree/ElementTree.py @ 46:c228aba7258c

ElementTree - Also check nodes in children attribute
author Bastian Blank <bblank@thinkmo.de>
date Sun, 27 Jul 2008 20:57:32 +0200
parents 722101222098
children e647f30cc08e
line wrap: on
line diff
--- a/emeraldtree/ElementTree.py	Sun Jul 27 15:51:21 2008 +0200
+++ b/emeraldtree/ElementTree.py	Sun Jul 27 20:57:32 2008 +0200
@@ -189,7 +189,7 @@
         attrib.update(extra)
         self.tag = tag
         self.attrib = attrib
-        self._children = list(children)
+        self._children = [self._check_node(i) for i in children]
 
     def __repr__(self):
         return "<Element %s at %x>" % (repr(self.tag), id(self))