Commit 56044b7e authored by Amos Latteier's avatar Amos Latteier

changed the batch orphan default from 3 to 0, bringing it in line with the dtml-in orphan default

parent bb3c5d9f
......@@ -84,8 +84,8 @@
##############################################################################
__doc__='''Batch class, for iterating over a sequence in batches
$Id: Batch.py,v 1.2 2001/04/27 20:51:20 evan Exp $'''
__version__='$Revision: 1.2 $'[11:-2]
$Id: Batch.py,v 1.3 2001/10/02 18:34:30 amos Exp $'''
__version__='$Revision: 1.3 $'[11:-2]
from ExtensionClass import Base
......@@ -111,7 +111,7 @@ class Batch(Base):
next = LazyNextBatch()
def __init__(self, sequence, size, start=0, end=0,
orphan=3, overlap=0):
orphan=0, overlap=0):
start = start + 1
......
......@@ -4,6 +4,13 @@ ZTUtils changes
Change information for previous versions can be found in the
file HISTORY.txt.
Version XXX
Bugs Fixed
- Changed the batch orphan default from 3 to 0. This mirrors
the change in the orphan default in dtml-in.
Version 1.1.1
Features Added
......
......@@ -30,7 +30,7 @@ class BatchTests(unittest.TestCase):
def testOrphan(self):
'''Test orphan collection'''
for bsize in (6, 7):
b = Batch(range(bsize), 5)
b = Batch(range(bsize), 5, orphan=3)
assert b.next is None
assert len(b) == bsize
b = Batch(range(8), 5)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment