[ZCM] [ZC] 419/ 1 Request "BTreeItems slice contains 1 too many elements"

Collector: Zope Bugs, Features, and Patches ... zope-coders@zope.org
Wed, 05 Jun 2002 15:37:26 -0400


Issue #419 Update (Request) "BTreeItems slice contains 1 too many elements"
 Status Pending, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/419

==============================================================
= Request - Entry #1 by Caseman on Jun 5, 2002 3:37 pm


Uploaded:  "testBTrees.py.patch"
 - http://collector.zope.org/Zope/419/testBTrees.py.patch/view
When slicing an IOBTreeItems object, the value returned has 1 too many elements.

For example, given a list l with 100 elements:

len(l{20:80]) returns 60

for an IOBTreeItems object iob with 100 elements:

len(iob[20:80]) returns 61

Attached is a patch for testBtrees.py which includes a test case for this which currently fails.
==============================================================