my general solution is something like that: class foo: def somemethod(self): myattr = self.getmyattr() def getmyattr(self): if not hasattr(self, '_v_myattr'): myattr = <do something to ...> else: myattr = getattr('_v_myattr'): return myattr -aj --On Montag, 28. Juli 2003 15:49 Uhr +0200 Gilles Lenfant <gilles@pilotsystems.net> wrote:
Hi,
I made a Product class with unpicklable attributes (compiled TALES expressions). Thus I got to name those _v_foo But for re-creating these attributes, I need to have a hook method called when the object is extracted from ZODB.
Is there such a hook method in Zope core classes ?
Thanks in advance.
--Gilles
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )