[Zope-Checkins] CVS: Zope/lib/python/ZTUtils - CHANGES.txt:1.7.8.1 Batch.py:1.6.14.2
Chris Withers
chrisw@nipltd.com
Fri, 15 Mar 2002 12:44:31 -0500
Update of /cvs-repository/Zope/lib/python/ZTUtils
In directory cvs.zope.org:/tmp/cvs-serv23663
Modified Files:
Tag: Zope-2_5-branch
CHANGES.txt Batch.py
Log Message:
merge from head
=== Zope/lib/python/ZTUtils/CHANGES.txt 1.7 => 1.7.8.1 ===
file HISTORY.txt.
+ After Version 1.1.4
+
+ Features Added
+
+ - Added useful 'total' attribute to batches.
+
Version 1.1.4
Features Added
=== Zope/lib/python/ZTUtils/Batch.py 1.6.14.1 => 1.6.14.2 ===
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