Skip to content
Browse files

Fixed #4337 -- Added pop() method to QueryDict. Thanks, Gary Wilson.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5289 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent ce9aca5 commit 9ed4217a57efc498e60bb3a2a10c57acc1ee6962 @malcolmt malcolmt committed May 19, 2007
Showing with 5 additions and 2 deletions.
  1. +2 −2 django/http/__init__.py
  2. +3 −0 tests/regressiontests/httpwrappers/tests.py
View
4 django/http/__init__.py
@@ -121,9 +121,9 @@ def update(self, other_dict):
self._assert_mutable()
MultiValueDict.update(self, other_dict)
- def pop(self, key):
+ def pop(self, key, *args):
self._assert_mutable()
- return MultiValueDict.pop(self, key)
+ return MultiValueDict.pop(self, key, *args)
def popitem(self):
self._assert_mutable()
View
3 tests/regressiontests/httpwrappers/tests.py
@@ -166,6 +166,9 @@
>>> q.pop('foo')
['bar', 'baz', 'another', 'hello']
+>>> q.pop('foo', 'not there')
+'not there'
+
>>> q.get('foo', 'not there')
'not there'

0 comments on commit 9ed4217

Please sign in to comment.
Something went wrong with that request. Please try again.