Tim Peters wrote:
If that's the goal, you may be alone in caring about it ;-): manual fiddling of _p_changed is rarely needed outside the _implementation_ of persistence. If you find yourself doing it a lot, there may be a flaw in your design, or in your mental model of how persistence in ZODB actually works.
My goal was to try and make ZODB a little more transparent. In an ideal world, persistence shouldn't require any modification of your classes. Transitive closures, reachable states, and unique identifiers should be Zope's responsibility alone, not the user's. Since _p_changed is used in several Zope tutorials illustrating how to write classes that can "tell" Zope your data has changed, my example code attempted (unsuccessfully it would seem) to render _p_changed obsolete by allowing Zope to automatically detect changes. Of course, I realize there's more to persistence than that. It was just an idea.
Chris _______________________________________________ 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