This makes session.__init__ slightly more complicated but probably
simplifies everything else, especially if we make the class smarter
later by having it track changes itself.
_log = logging.getLogger(__name__)
class Session(dict):
+ def __init__(self, *args, **kwargs):
+ self.send_new_cookie = False
+ dict.__init__(self, *args, **kwargs)
+
def save(self):
self.send_new_cookie = True
def is_updated(self):
- return getattr(self, 'send_new_cookie')
+ return self.send_new_cookie
def delete(self):
self.clear()