Jeff Rush wrote:
In Python 2.2 (which is unfortunately not yet an option unless you are using a bleeding edge Zope) you can also use the new property type:I use a form of the following to compute dynamic titles for Zope objects, where the 'title' attribute is the result of a method call. Modifying it slightly for your case...from ComputedAttribute import ComputedAttribute Class B(A): def getMyObjects(self): ... myObjects = ComputedAttribute(lambda self: self.getMyObjects())
http://www.python.org/doc/2.2.1/whatsnew/sect-rellinks.html#SECTION000340000000000000000
seb
_______________________________________________
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 )