[Zope-dev] __getattr__ and Acquisition

Leonardo Rochael Almeida leo@hiper.com.br
23 Sep 2002 15:39:35 -0300


On Sun, 2002-09-22 at 18:39, Andreas Kostyrka wrote:
> Hi!
> 
> I've just discovered, that Acquisition does not work with __getattr__,
> right?
> 
> (I assume that this is so because something like getattr(mybase,attr) is
> called during the acquisition process to prevent infinite recursion.)

I believe that is correct.

> 
> Anyway to get around that? (To basically get a wrapped self from
> somewhere?)

You might want to look at PortableHole for inspiration. It does get
around getattr problems with acquisition:

http://www.zope.org/Members/TheJester/PortableHole

Cheers, Leo

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.