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

Chris Withers chrisw@nipltd.com
Fri, 15 Mar 2002 11:01:52 -0500


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

Modified Files:
	CHANGES.txt Batch.py 
Log Message:
Added useful 'total' attribute to batches.

=== Zope/lib/python/ZTUtils/CHANGES.txt 1.7 => 1.8 ===
   file HISTORY.txt.
 
+    After Version 1.1.3
+
+      Features Added
+
+        - Added useful 'total' attribute to batches.      
+
     Version 1.1.4
 
       Features Added


=== Zope/lib/python/ZTUtils/Batch.py 1.7 => 1.8 ===
         0-based index.  "length" is the actual number of elements in
         the batch.
+
+        "total" is the length of the original, unbatched, sequence
         '''
 
         start = start + 1
@@ -68,6 +70,7 @@
         self.overlap = overlap
         self.first = max(start - 1, 0)
         self.length = self.end - self.first
+        self.total = len(sequence)
         if self.first == 0:
             self.previous = None