Django

Code

Changeset 5289

Show
Ignore:
Timestamp:
05/19/07 13:34:00 (1 year ago)
Author:
mtredinnick
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/http/__init__.py

    r5187 r5289  
    122122        MultiValueDict.update(self, other_dict) 
    123123 
    124     def pop(self, key): 
    125         self._assert_mutable() 
    126         return MultiValueDict.pop(self, key
     124    def pop(self, key, *args): 
     125        self._assert_mutable() 
     126        return MultiValueDict.pop(self, key, *args
    127127 
    128128    def popitem(self): 
  • django/trunk/tests/regressiontests/httpwrappers/tests.py

    r5187 r5289  
    167167['bar', 'baz', 'another', 'hello'] 
    168168 
     169>>> q.pop('foo', 'not there') 
     170'not there' 
     171 
    169172>>> q.get('foo', 'not there') 
    170173'not there'