[ZPT] CVS: Zope/lib/python/ZTUtils - Batch.py:1.7.18.1 CHANGES.txt:1.7.28.1
Casey Duncan
casey@zope.com
Wed, 27 Mar 2002 15:52:04 -0500
Update of /cvs-repository/Zope/lib/python/ZTUtils
In directory cvs.zope.org:/tmp/cvs-serv22094/lib/python/ZTUtils
Modified Files:
Tag: casey-death_to_index_html-branch
Batch.py CHANGES.txt
Log Message:
Updating branch to head for testing
=== Zope/lib/python/ZTUtils/Batch.py 1.7 => 1.7.18.1 ===
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):
@@ -53,6 +59,8 @@
argument, is a 1-based index (I know, lame). "first" is the
0-based index. "length" is the actual number of elements in
the batch.
+
+ "sequence_length" is the length of the original, unbatched, sequence
'''
start = start + 1
=== Zope/lib/python/ZTUtils/CHANGES.txt 1.7 => 1.7.28.1 ===
file HISTORY.txt.
+ After Version 1.1.4
+
+ Features Added
+
+ - Added 'sequence_length' attribute to batches.
+
Version 1.1.4
Features Added