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
This commit is contained in:
Jacob Kaplan-Moss 2009-03-31 06:30:07 +00:00
parent 9ae873fcd8
commit 184ea1c91f
3 changed files with 41 additions and 9 deletions

View file

@ -45,6 +45,8 @@ MergeDict can merge MultiValueDicts
['Adrian', 'Simon']
>>> list(d.iteritems())
[('position', 'Developer'), ('name', 'Simon')]
>>> list(d.iterlists())
[('position', ['Developer']), ('name', ['Adrian', 'Simon'])]
>>> d['lastname']
Traceback (most recent call last):
...
@ -58,6 +60,10 @@ MultiValueDictKeyError: "Key 'lastname' not found in <MultiValueDict: {'position
>>> d.setlist('lastname', ['Holovaty', 'Willison'])
>>> d.getlist('lastname')
['Holovaty', 'Willison']
>>> d.values()
['Developer', 'Simon', 'Willison']
>>> list(d.itervalues())
['Developer', 'Simon', 'Willison']
### SortedDict #################################################################