summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/datastructures.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index f27bc1cfff..818731ba04 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -266,6 +266,14 @@ class MultiValueDict(dict):
"""
return [(key, self[key]) for key in self.keys()]
+ def iteritems(self):
+ """
+ Yields (key, value) pairs, where value is the last item in the list
+ associated with the key.
+ """
+ for key in self.keys():
+ yield (key, self[key])
+
def lists(self):
"""Returns a list of (key, list) pairs."""
return super(MultiValueDict, self).items()