Michael Spencer wrote:
    def __deepcopy__(self, memo={}):
        from copy import deepcopy
        result = self.__class__()
        memo[id(self)] = result
        result.__init__(deepcopy(tuple(self), memo))
        return result

I know this is not your recipe, but is there any reason to use self.__class__() instead of type(self)() if you know you're inside a new-style class?

STeVe
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to