[ZODB-Dev] know the state of an object

Jim Fulton jim at zope.com
Fri Oct 14 09:01:00 EDT 2005


Tim Peters wrote:
> [dvd]
...
> So, in the end, I don't see any hope for you via this route, short of this:
> register an object as changed in your __setattr__ without worrying at all
> about _why_ __setattr__ was called.  Later, when you "do something" with
> your list of modified objects, simply ignore any whose state at that time is
> UPTODATE.  Those are exactly the objects whose state got materialized but
> didn't change thereafter.

The long term solution to these are other related use cases is to start
using events in ZODB.  That is, ZODB should use zope.event to report
happenings of potential interest to applications.  Then applications
can use the event system to be notified and provide additional
functionality.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the ZODB-Dev mailing list