Pascal Peregrina wrote at 2006-4-12 08:35 +0100: >I use FileStorage (via ZEO). > >I have switched a big dictionary from PersistentMapping to BTree. > >In the past, it was easy to compute added/deleted keys from states (cause >PersistentMapping state contains the whole dictionary, so it was only a matter >of getting the keys and comparing them with previous state keys).
What do you mean by "state"? What you get with "obj.__getstate__()"? In this case, you can indeed not compute added/deleted keys alone from the current and a previous state of the tree alone. You must also take into account the state of children... >... So could you give me a little more details about what you mean? (or of course point me to some example/resources on the net) Search the mailing list archive (for "firstname.lastname@example.org" or "email@example.com") for a post from me about "HistoryJar". This is a speciallized ZODB connection that loads the state of objects as it was at a given time. In this, I do not mean "state" technically as the result of "__getstate__" but as the complete object state. You can use such a "historical" object in the same way as you use a "current" object (apart from not being able to modify it). Especially, you can ask a historical BTrees.XXBTree instance for all its keys and compare this to all the keys of the current object. -- Dieter _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev