[Zope-Checkins] CVS: Zope/lib/python/Products/Transience - Transience.py:1.32.26.1

Jim Fulton cvs-admin at zope.org
Sat Nov 15 07:11:44 EST 2003


Update of /cvs-repository/Zope/lib/python/Products/Transience
In directory cvs.zope.org:/tmp/cvs-serv24892/lib/python/Products/Transience

Modified Files:
      Tag: zodb33-devel-branch
	Transience.py 
Log Message:
Changed getLen to be a method.


=== Zope/lib/python/Products/Transience/Transience.py 1.32 => 1.32.26.1 ===
--- Zope/lib/python/Products/Transience/Transience.py:1.32	Tue Jan 21 02:55:22 2003
+++ Zope/lib/python/Products/Transience/Transience.py	Sat Nov 15 07:11:42 2003
@@ -427,8 +427,10 @@
             # our "__len__" is the length of _index.
             # we need to maintain the length of the index structure separately
             # because getting the length of a BTree is very expensive.
-            try: self.__len__.set(0)
-            except AttributeError: self.__len__ = self.getLen = Length()
+            try:
+                self.__len__.set(0)
+            except AttributeError:
+                self.__len__ = Length()
 
             # set up last_timeslice and deindex_next integer pointers
             # we set them to the current timeslice as it's the only sane
@@ -437,6 +439,9 @@
             self._deindex_next=Increaser(self._getCurrentTimeslice())
         finally:
             self.lock.release()
+
+    def getLen(self):
+        return self.__len__
 
     def _getCurrentBucket(self):
         """




More information about the Zope-Checkins mailing list