[Zope-dev] __getattr__ and Acquisition
Lennart Regebro
lennart@torped.se
Mon, 23 Sep 2002 18:57:15 +0200
From: "Andreas Kostyrka" <andreas@kostyrka.priv.at>
> Well, where do you intenden your getattr to get the attribute from?
As I said, this is an example. This getattr part is supposed to be replaced
with whatever you do to get the attribute. Otehrwise it would be rather
useless, since it wouldn't do anything that isn't already done. :-)
> Difficult. Because __getattr__ does not have access to the acquisition
> chain.
Well, you fix that with __of__, which is what I was going to say, but
forgot. :-)
I won't venture in giving you any example code, though, but the PortalSkins
is one place to look. Also, depending of when you want the properties from
the transparent folder to be aqcuirable you might be able to wrap the object
by calling __of__ instead of overriding it.
Best Regards
Lennart Regebro, Torped
http://www.easypublisher.com/