diff src/memory/persistent.py @ 442:ab9ddf6c7eaf

core: added get method to PersistentDictionary
author Goffi <goffi@goffi.org>
date Sat, 03 Dec 2011 22:21:52 +0100
parents 866dbb0d7d87
children cf005701624b
line wrap: on
line diff
--- a/src/memory/persistent.py	Sat Dec 03 22:21:27 2011 +0100
+++ b/src/memory/persistent.py	Sat Dec 03 22:21:52 2011 +0100
@@ -104,6 +104,9 @@
             self.storage.delIndPrivate(self.namespace, key, self.profile)
         return self._cache.__delitem__(key)
 
+    def get(self, key, default=None):
+        return self._cache.get(key, default)
+
     def force(self, name):
         """Force saving of an attribute to storage
         @return: deferred fired when data is actually saved"""