[ZPT] CVS: Releases/Zope/lib/python/ZTUtils - Batch.py:1.6.14.3 CHANGES.txt:1.7.8.2

Evan Simpson evan@zope.com
Fri, 15 Mar 2002 16:50:55 -0500


Update of /cvs-repository/Releases/Zope/lib/python/ZTUtils
In directory cvs.zope.org:/tmp/cvs-serv23086

Modified Files:
      Tag: Zope-2_5-branch
	Batch.py CHANGES.txt 
Log Message:
Merge changes from trunk


=== Releases/Zope/lib/python/ZTUtils/Batch.py 1.6.14.2 => 1.6.14.3 ===
                      parent.orphan, parent.overlap)
 
+class LazySequenceLength(Base):
+    def __of__(self, parent):
+        parent.sequence_length = l = len(parent._sequence)
+        return l
+
 class Batch(Base):
     """Create a sequence batch"""
     __allow_access_to_unprotected_subobjects__ = 1
 
     previous = LazyPrevBatch()
     next = LazyNextBatch()
+    sequence_length = LazySequenceLength()
     
     def __init__(self, sequence, size, start=0, end=0,
                  orphan=0, overlap=0):
@@ -54,7 +60,7 @@
         0-based index.  "length" is the actual number of elements in
         the batch.
 
-        "total" is the length of the original, unbatched, sequence
+        "sequence_length" is the length of the original, unbatched, sequence
         '''
 
         start = start + 1


=== Releases/Zope/lib/python/ZTUtils/CHANGES.txt 1.7.8.1 => 1.7.8.2 ===
       Features Added
 
-        - Added useful 'total' attribute to batches.      
+        - Added 'sequence_length' attribute to batches.      
 
     Version 1.1.4