[Zope-dev] Iterating through BTreeItems

Christian Robottom Reis kiko@async.com.br
Thu, 24 May 2001 12:59:35 -0300 (BRT)


I'm starting to check out how SearchIndex works, and I've run into the
following question: how does one iterate through *TreeItems objects? I
thought this was trivial, but I'm doing the following:

>>> t = BTrees.IOBTree.IOBTree()
>>> t.insert(1,'Foo')
1
>>> t.items()
<IOBTreeItems object at 0x82551b0>
>>> t = t.items()
>>> dir(t)
[]

How can I find out that the items list contains? Is using items() the
correct way to do this?

Take care,
--
/\/\ Christian Reis, Senior Engineer, Async Open Source, Brazil
~\/~ http://async.com.br/~kiko/ | [+55 16] 274 4311