summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-02-28 05:09:20 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-02-28 05:09:20 +0000
commitff3423ca4cab29887f547189eaa1cf90a1988a6d (patch)
tree5346aac7d51c79b06ed3125810078907156141fa /django/utils
parent5e34ce97df3563883f1c0035e2150f90fe78ed30 (diff)
newforms-admin: Merged to [4640]
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/datastructures.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index c20da05144..94ab76c483 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -16,6 +16,9 @@ class MergeDict(object):
def __contains__(self, key):
return self.has_key(key)
+
+ def __copy__(self):
+ return self.__class__(*self.dicts)
def get(self, key, default=None):
try:
@@ -42,6 +45,10 @@ class MergeDict(object):
if dict.has_key(key):
return True
return False
+
+ def copy(self):
+ """ returns a copy of this object"""
+ return self.__copy__()
class SortedDict(dict):
"A dictionary that keeps its keys in the order in which they're inserted."