Stephen Masterman wrote at 2005-5-17 15:55 -0400:
>Does ZODB have something equivalent to Durus' Computed Attributes? Which
>I understand are attributes (or methods) on a Persistent object that
>compute a value from some other attributes and then cache that result
>for each connection, and if any of the attributes from which the
>Computed Attribute computes its result change, the new result will be
>automatically computed and all connections will have their cached value
Oneone else already pointed out "ComputedAttribute".
It does neither automatic caching nor is there any support
for modification notifications.
> ... "__getattr__"
>and I know the ZODB docs warn against messing
>with those functions for Persistent classes.
"__getattr__" is still very dangerous -- especially when it handles acquisition
But Jim removed the explicit problem related to persistent objects
a long time ago. Only the general dangers for "__getattr__" remain.
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org