[ZODB-Dev] weird BTrees KeyError (CVS HEAD)

Dieter Maurer dieter at handshake.de
Sat Jun 28 20:47:46 EDT 2003


Christian Reis wrote at 2003-6-27 16:46 -0300:
 > On Fri, Jun 27, 2003 at 03:03:40PM -0400, Tim Peters wrote:
 > > [Christian Reis]
 > > > Would a normal list be safe, even while mutating?
 > > 
 > > It's never safe to mutate an object used as a BTree key, regardless of its
 > > type.  Please see:
 > > 
 > >     http://www.zope.org/Wikis/ZODB/guide/node6.html
 > > 
 > > and esp. section 5.3.1 (Total Ordering and Persistence).
 > 
 > Hmmm. That is a problem for us, then. In IC, we do arbitrary queries for
 > objects based on attributes they have; when they have list attributes we
 > auto-swap them for PersistentLists, but we use these lists as the keys
 > in the index BTrees.

You might use tuples (provided the components fullfil the ordering
constraint).


Dieter



More information about the ZODB-Dev mailing list