Commits

Sergey Schetinin  committed 0a378fe

make CacheControl usage of UpdateDict overridable via CacheControl.update_dict [from pycon2011 sprint]

  • Participants
  • Parent commits fd87feb

Comments (0)

Files changed (2)

File webob/cachecontrol.py

 """
 import re
 
-import re
 
 class UpdateDict(dict):
     """
     only apply to requests or responses).
     """
 
+    update_dict = UpdateDict
+
     def __init__(self, properties, type):
         self.properties = properties
         self.type = type
         ``updates_to``, if that is given.
         """
         if updates_to:
-            props = UpdateDict()
+            props = cls.update_dict()
             props.updated = updates_to
         else:
             props = {}

File webob/response.py

-import sys, re, urlparse, zlib, struct
+import re, urlparse, zlib, struct
 from datetime import datetime, date, timedelta
 
 from webob.headers import ResponseHeaders