diff emeraldtree/tree.py @ 62:2461a04b352e

QName - Remove mostly useless copy function and text property
author Bastian Blank <bblank@thinkmo.de>
date Mon, 03 May 2010 18:23:32 +0200
parents 644bf7185b57
children bd93ebba58ba
line wrap: on
line diff
--- a/emeraldtree/tree.py	Tue May 18 14:58:05 2010 +0200
+++ b/emeraldtree/tree.py	Mon May 03 18:23:32 2010 +0200
@@ -476,13 +476,7 @@
 
     def __setattr__(self, key, value):
         raise AttributeError('read-only')
-
-    def copy(self):
-        return self.__class__(self.name, self.uri)
-
-    @property
-    def text(self):
-        return self
+    __delattr__ = __setattr__
 
 # --------------------------------------------------------------------
 
@@ -1060,7 +1054,7 @@
     def _fixname(self, key):
         # expand qname, and convert name string to ascii, if possible
         if key in self._names:
-            return self._names[key].copy()
+            return self._names[key]
         if '}' in key:
             uri, name = key.split('}', 1)
             name = QName(name, uri)