If your __getattr__ fails to find what it wants, it should raise an
AttributeError. This will give the ball back to the acquisition
machinery.

Thusly:

def __getattr__(self, name):
    if name = 'foo':
        return self.foo()
    raise AttributeError, name

hth,

-Casey

On Tue, 2002-06-04 at 22:28, Erik A. Dahl wrote:
> Ok I need to override __getattr__ in one of my product classes.  I'm 
> sure this is killing acquisition but not sure about the persistence 
> stuff (I think this is working).  Is there a way to make this work? 
>  Here is what I'm doing:
> 
> def __getattr__(self, name):
>     if name == 'myattr':
>         return self.myattr()
> 
> 
> I assume that somewhere in the Acquisition code there is a __getattr__ 
> but I can't find it.  I tried calling Implicit.__getattr__ but its not 
> there.  If some one has an example that would be great.
> 
> -EAD
> 
> 
> 
> _______________________________________________
> 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 )




_______________________________________________
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