On Friday 19 May 2006 07:47, Frank Burkhardt wrote:
> Unfortunately, the view removes just half the objects - independently of
> how much objects are left inside the container.

That is the correct behavior. BTrees change their internal data structure with 
every change, such as deletion of an item, and thus the keys() method is not 
guaranteed to iterate over all items. Use one of the following instead:

for entry in tuple(tree.keys())

for entry in tree.iterkeys()

Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
Zope3-users mailing list

Reply via email to