[Zope] aq_inner and acquisition by containment only
l-zope.z.xalan at xoxy.net
Tue May 11 12:07:55 EDT 2004
while solving a somewhat intricate acquisition problem, I came
discovered, that the statement, that aq_inner will return an object
wrapped by containment only seems to be incorrect. Here is the
simplified scenario to show this:
Let a and c be attributes of x, let b be an attribute of a. Then
x.a.c.a.b is the acquisition tree (as shown in Zope 2.7.0 using a little
tool akin showaq)
(self goes to the right, parent down). The important thing is, that
aq_inner of this is the same tree. I would have expexted to get the
but looking at the first tree, it is obvious, why this is not the
case. The Documentation says, that ( X o Y ) o ( Y o Z ) is simplified
to X o ( Y o Z ). While working out the expression, I could find, that
this simplification will close to the end simplify the b o ( a o x )
subtree away, since the next expression starts with ( a o x ).
This leaves me a little bit uneasy: when searching x.a.c.a.b.aq_inner,
c will be searched even though it is *not* in the containment path of
I would very much like a comment on this ... Is this known behavior?
Should I have expected this?
-- *DON'T* TRY TO REACH ME DIRECTLY AT ABOVE EMAIL ADDRESS. Any reply
-- received off-list at that address will be *silently* and
-- *unconditionally* dropped. You can attribute this inconvenience to
-- the proliferation of spammers on the Internet. I hope, you can
-- understand my position and accept my counter measures.
More information about the Zope