/[opental]/opental/pax/core.py
ViewVC logotype

Diff of /opental/pax/core.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by lalo, Mon Jan 27 07:05:12 2003 UTC revision 1.15 by lalo, Fri Feb 21 18:37:05 2003 UTC
# Line 63  class Element(Container): Line 63  class Element(Container):
63                  attributes[duri] = {}                  attributes[duri] = {}
64          self.raw = raw          self.raw = raw
65    
66      def copy(self):      def copy(self, newclass=None):
67          copy = self.__class__(self.ns, self.name, {}, self.nsdecls.copy(), self.raw)          if newclass is None:
68                newclass = self.__class__
69            copy = newclass(self.ns, self.name, {}, self.nsdecls.copy(), self.raw)
70          # attributes is copied with one level of depth          # attributes is copied with one level of depth
71          for ns, attrs in self.attributes.items():          for ns, attrs in self.attributes.items():
72              copy.attributes[ns] = attrs.copy()              copy.attributes[ns] = attrs.copy()

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26