[ZODB-Dev] Re: [Zope-dev] [BUG] maybe yet unknown BTREES bug
Chris McDonough
chrism@zope.com
25 Jan 2003 18:03:29 -0500
> That one's a stretch <wink>. Mutating while iterating may give surprising
> results, but it shouldn't be possible to *damage* a BTree this way, and a
> healthy BTree should never raise KeyError on "tree[k] = v", *unless* it's
> the case that the type of the keys implement their own __cmp__ method that
> may itself raise KeyError (in which case it's not the BTree methods that are
> raising KeyError, but the user-defined __cmp__ method). It may very well
> raise KeyError on the *reference* "tree[k]", but Dieter is doing a
> __setitem__ here, not a __getitem__: if k "vanished" from the tree,
> __setitem__ should merely create it again.
Thanks for the clarification!
- C