diff emeraldtree/ElementTree.py @ 36:29ab13148a54

ElementTree - Siplify QName compare method
author Bastian Blank <bblank@thinkmo.de>
date Mon, 14 Jul 2008 14:40:22 +0200
parents 00ee3db419a9
children 4bb8fc436265
line wrap: on
line diff
--- a/emeraldtree/ElementTree.py	Mon Jul 14 14:22:22 2008 +0200
+++ b/emeraldtree/ElementTree.py	Mon Jul 14 14:40:22 2008 +0200
@@ -504,10 +504,7 @@
 
     def __cmp__(self, other):
         if isinstance(other, QName):
-            c = cmp(self.uri, other.uri)
-            if c:
-                return c
-            return cmp(self.name, other.name)
+            return cmp(self.text, other.text)
         return cmp(self.text, other)
 
     def copy(self):