[ZODB-Dev] BTrees questions

Martijn Faassen faassen@vet.uu.nl
Mon, 17 Dec 2001 19:17:28 +0100


Hi there,

I've been experimenting some with buckets & btrees some, 
but am a bit confused about some issues. Example first:

>>> from BTrees.IIBTree import IIBucket
>>> b = IIBucket([(1, 4), (2, 5), (3, 6)])
>>> b
IIBucket([(1, 4), (2, 5), (3, 6)])
>>> b.keys(0, 4)
[1, 2, 3]
>>> b.values(0, 4)
[4, 5, 6]
>>> b.keys(2, 3)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
IndexError: list assignment index out of range

Should this happen? It seems to happen for buckets whenever I fill in
a min larger than 1. I probably don't understand the datastructure
too well but I thought I'd ask. Should I be using buckets or BTrees?

Regards,

Martijn