Ticket #5183: deepcopy.patch

File deepcopy.patch, 554 bytes (added by David Blewett <david@…>, 8 years ago)

Patch to django/utils/datastructures.py that implements deepcopy

  • django/utils/datastructures.py

     
    7070        for k in self.keyOrder:
    7171            yield k
    7272
     73    def __deepcopy__(self, memo):
     74        from copy import deepcopy
     75        dc = self.__class__()
     76        for k, v in self.items():
     77            dc[k] = deepcopy(v, memo)
     78
     79        return dc
     80
    7381    def items(self):
    7482        return zip(self.keyOrder, self.values())
    7583
Back to Top