def __deepcopy__(self, memo): newone = type(self)(self.length, self.pointer) newone.__dict__.update(self.__dict__) if self.pointer != None: newone.pointer = _wildcard_copy(self.pointer, self.length) return newone
def __deepcopy__(self,memo): newone = type(self)(self.length,self.pointer) newone.__dict__.update(self.__dict__) if self.pointer != None: newone.pointer = _wildcard_copy(self.pointer,self.length) return newone
def wildcard_copy(w): if w.pointer != None: return wildcard(w.length, _wildcard_copy(w.pointer, w.length)) else: return wildcard(w.length, None)
def wildcard_copy(w): if w.pointer != None: return wildcard(w.length,_wildcard_copy(w.pointer,w.length)) else: return wildcard(w.length,None)