From fa3ed6e1341f7c8b468e2267b3fafddeb58cdac2 Mon Sep 17 00:00:00 2001 From: Jeremy Dunck Date: Fri, 23 Mar 2007 16:35:57 +0000 Subject: gis: Merged revisions 4669-4785 via svnmerge from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@4786 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/datastructures.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'django/utils/datastructures.py') diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py index 94ab76c483..7b7fa2b0f0 100644 --- a/django/utils/datastructures.py +++ b/django/utils/datastructures.py @@ -92,6 +92,13 @@ class SortedDict(dict): "Returns the value of the item at the given zero-based index." return self[self.keyOrder[index]] + def copy(self): + "Returns a copy of this object." + # This way of initializing the copy means it works for subclasses, too. + obj = self.__class__(self) + obj.keyOrder = self.keyOrder + return obj + class MultiValueDictKeyError(KeyError): pass -- cgit v1.3