Martijn Pieters wrote:
> 
> You could use ComputedAttribute for that:
> 
> class MyClass(Acquisition.Explicit):
>     # The following attribute is acquired transparently
>     def _acquired_your_attribute(self):
>         return self.aq_acquire('your_attribute')
>     your_attribute =  ComputedAttribute(_acquired_your_attribute, 1)
> 
>     # index_html isn't
>     index_html = None

That looks cool :-)

Where's it documented? what does the 1 mean?

cheers,

Chris

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to