1. Martin Thorsen Ranang
  2. paste


Ian Bicking  committed a36affa

Add default argument to paste.response.HeaderDict.pop (to make it more like a normal dict): http://trac.pythonpaste.org/pythonpaste/ticket/279

  • Participants
  • Parent commits 1b824e7
  • Branches default

Comments (0)

Files changed (1)

File paste/response.py

View file
     def setdefault(self, key, failobj=None):
         return dict.setdefault(self, self.normalize(key), failobj)
-    def pop(self, key):
-        return dict.pop(self, self.normalize(key))
+    def pop(self, key, *args):
+        return dict.pop(self, self.normalize(key), *args)
     def update(self, other):
         for key in other:
         for name, value in seq:
             self.add(name, value)
         return self
     fromlist = classmethod(fromlist)
 def has_header(headers, name):
     Returns the status, headers, and body of an error response.
     Use like:
     .. code-block:: python
         status, headers, body = wsgilib.error_response(
             % (url, url))
         start_response(status, headers)
         return [body]
     **Note:** Deprecated
     if __warn: