summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-03-31 06:30:07 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-03-31 06:30:07 +0000
commit184ea1c91f06d31d0e1d34b2c27c08b01d2d5033 (patch)
tree620b15d0030d4238002ea5937cd9a59d3521c21c /django/utils/datastructures.py
parent9ae873fcd83221a17d41f31f2ac32e37f439ae7b (diff)
Fixed #8847, #10370: added some missing methods to MultiValueDict after [8399]. Thanks, James Turk and rfk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/datastructures.py')
-rw-r--r--django/utils/datastructures.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index d0cd9085dd..ce2424065d 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -294,10 +294,19 @@ class MultiValueDict(dict):
"""Returns a list of (key, list) pairs."""
return super(MultiValueDict, self).items()
+ def iterlists(self):
+ """Yields (key, list) pairs."""
+ return super(MultiValueDict, self).iteritems()
+
def values(self):
"""Returns a list of the last value on every key list."""
return [self[key] for key in self.keys()]
-
+
+ def itervalues(self):
+ """Yield the last value on every key list."""
+ for key in self.iterkeys():
+ yield self[key]
+
def copy(self):
"""Returns a copy of this object."""
return self.__deepcopy__()