diff emeraldtree/ElementTree.py @ 20:56cb25aba1e6

Make Element always true. emeraldtree/ElementTree.py: Add __nonzero__ to Element.
author Bastian Blank <bblank@thinkmo.de>
date Sat, 31 May 2008 21:50:36 +0200
parents 28fcf9993b62
children 7b33b90de8be
line wrap: on
line diff
--- a/emeraldtree/ElementTree.py	Sat May 31 19:07:35 2008 +0200
+++ b/emeraldtree/ElementTree.py	Sat May 31 21:50:36 2008 +0200
@@ -211,6 +211,9 @@
     def __len__(self):
         return len(self._children)
 
+    def __nonzero__(self):
+        return True
+
     ##
     # Returns the given subelement.
     #