On Sep 22, 2006, at 2:23 PM, Jesus Cea wrote:
> 6. (recovered from Durus 3.5 wish-list) BTree objects need a "changed"
> method. I hate to do "a[b]=a[b]" to notify the persistence framework
> about changes in "a[b]" when it is a non-persistent container. I've
> had
> problems with some of my junior coders removing such a "redundant"
> code
> because "it does nothing". Argggg!.
>
> All other persistent containers have a "_p_note_change" method.
> Simetry
> applies :-).
BTree already has the same _p_note_change method as all other Persistent
instances, so we have perfect symmetry.
I guess that you really want a special case for BTree, something like
this:
def note_change_of_bnode_containing_key(self, key):
"""()
If self[key] is a non-persistent container with changes that
you want
to include in the next transaction, call this.
"""
self[key] = self[key]