Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 9ed4217a57efc498e60bb3a2a10c57acc1ee6962 1 parent ce9aca5
@malcolmt malcolmt authored
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.