[Zope-Checkins] CVS: Zope3/lib/python/Persistence - Cache.py:1.1.2.4

Jeremy Hylton jeremy@zope.com
Sat, 9 Mar 2002 00:26:16 -0500


Update of /cvs-repository/Zope3/lib/python/Persistence
In directory cvs.zope.org:/tmp/cvs-serv11224

Modified Files:
      Tag: Zope-3x-branch
	Cache.py 
Log Message:
Add some whitespace.  Remove some optimization.



=== Zope3/lib/python/Persistence/Cache.py 1.1.2.3 => 1.1.2.4 ===
 
     def invalidate(self, oid):
-        ob=self.__aget(oid, self)
-        if ob is self: return
-        ob=ob()
+        ob = self.__aget(oid, self)
+        if ob is self:
+            return
+        ob = ob()
         del ob._p_changed
         del self.__active[oid]
-        ghosts=self.__ghosts
+        ghosts = self.__ghosts
         ghosts[oid] = ref(ob, _dictdel(oid, ghosts))
 
     def invalidateMany(self, oids):
         if oids is None:
-            oids=self.__active.keys()
-        aget=self.__aget
-        active=self.__active
-        ghosts=self.__ghosts
+            oids = self.__active.keys()
         for oid in oids:
-            ob=aget(oid, self)
-            if ob is self: continue
-            ob=ob()
+            ob = self.__aget(oid, self)
+            if ob is self:
+                continue
+            ob = ob()
             del ob._p_changed
-            del active[oid]
-            ghosts[oid] = ref(ob, _dictdel(oid, ghosts))
+            del self.__active[oid]
+            self.__ghosts[oid] = ref(ob, _dictdel(oid, self.__ghosts))
 
     def statistics(self):
         return {