Ticket #4337: 4337.2.diff

File 4337.2.diff, 883 bytes (added by Gary Wilson <gary.wilson@…>, 17 years ago)

or to be more like the standard library

  • django/http/__init__.py

    === modified file 'django/http/__init__.py'
     
    121121        self._assert_mutable()
    122122        MultiValueDict.update(self, other_dict)
    123123
    124     def pop(self, key):
     124    def pop(self, key, *args):
    125125        self._assert_mutable()
    126         return MultiValueDict.pop(self, key)
     126        return MultiValueDict.pop(self, key, *args)
    127127
    128128    def popitem(self):
    129129        self._assert_mutable()
  • tests/regressiontests/httpwrappers/tests.py

    === modified file 'tests/regressiontests/httpwrappers/tests.py'
     
    166166>>> q.pop('foo')
    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'
    171174
Back to Top