[ZODB-Dev] lazy BTreeItems
Andreas Jung
lists at andreas-jung.com
Fri Dec 9 02:17:36 EST 2005
--On 9. Dezember 2005 12:05:23 +0500 Victor Safronovich
<vsafronovich at naumen.ru> wrote:
> Hello zodb-dev!
>
> Is this a correct behaviour?
>>>> from BTrees.IIBTree import IIBTree
>>>> t = IIBTree(map(None,range(5),range(5)))
>>>> list(t.keys())
> [0, 1, 2, 3, 4]
>>>> k = t.keys()
>>>> list(k)
> [0, 1, 2, 3, 4]
>>>> del t[0]
>>>> list(k)
> []
That's different from my instance (Zope HEAD):
>>> t = IIBTree(map(None, range(5), range(5)))
>>> list(t.keys())
[0, 1, 2, 3, 4]
>>> k = t.keys()
>>> list(k)
[0, 1, 2, 3, 4]
>>> del t[0]
>>> list(k)
[1, 2, 3, 4]
-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20051209/755602b6/attachment.bin
More information about the ZODB-Dev
mailing list