[ZODB-Dev] BTrees and Mutables, was Re: [IndexedCatalog] bug in default indexing

Andreas Jung andreas@andreas-jung.com
Tue, 11 Feb 2003 21:09:43 +0100


--On Dienstag, 11. Februar 2003 15:03 -0500 Casey Duncan <casey@zope.com> 
wrote:

> An alternative which is perhaps more palatable is to just set the whole
> mutable object into the btree again. Like:
>
> l = tree['bar']
> l.append(4)
> tree['bar'] = l # Trigger list persistance
>

What about using the PersistentList?

from ZODB.PersisntentList import PersistentList
tree['bar'] = PersistentList()
tree['bar'].append(4)

-aj