17 Oct
2002
17 Oct
'02
9:24 a.m.
John Barratt wrote:
OK, a bit of python and Zope experimenting and I have got a little further with this, and my understanding as to when __getattr__ is actually called!
This gets closer to working, by calling the __getattr__ from the Implicit base class, but could be barking up the wrong tree :
def __getattr__(self,attr): if name = 'foo': return self.foo()
return Implicit.__class__.__getattr__(self,attr)
If you really want to do just that, take a look at ComputedAttribute, just in case you don't know. foo = ComputedAttribute(_foo) def _foo(self,..): <do something> return something cheers, oliver