Hi What's a "ComputedAttribute"??? I've done my work looking everywhere... Neither the Zope Book nor other documents say nothing about it. In Dieter Maurer's book they're menctioned but no details. Searching at zope.org and the mailing list archives, I've just found a few references ("a ComputedAttribute is useful here" or things like that), but nobody says what a C.A. really is. Looking at the Zope sources I've found a few modules using it. I guess a ComputedAttribute acts like an instance attribute but really it's implemented as a method. That would be useful for delegation. But in DTMLFile class: def _get__roles__(self): ... compute something and return that... __roles__ = ComputedAttribute(_get__roles__, 1) what's the second argument? And, what's the difference with using __getattr__()? Gabriel Genellina Softlab SRL
Gabriel Genellina writes:
What's a "ComputedAttribute"??? I've done my work looking everywhere... Neither the Zope Book nor other documents say nothing about it. In Dieter Maurer's book they're menctioned but no details. You find some documentation in
lib/Components/ExtensionClass/doc/ExtensionClass.html of your Zope distribution. You find some more information in the mailing list archives. The corresponding posts should be easily locatable, e.g., through Google... Dieter
participants (2)
-
Dieter Maurer -
Gabriel Genellina