def __getitem__(self, key):
    return dict.__getitem__(self, key)

def __setitem__(self, key, val):
    dict.__setitem__(self, key, val)
self._dump()

def __repr__(self):
    dictrepr = dict.__repr__(self)
return '%s(%s)' % (type(self).__name__, dictrepr)

def update(self, *args, **kwargs):
    for k, v in list(dict(*args, **kwargs).items()):
        self[k] = v
self._dump()
With Python, can I keep a persistent dictionary and modify it?