[Zope] aq_inner and acquisition by containment only

Dieter Maurer dieter at handshake.de
Wed May 12 16:21:23 EDT 2004

Stefan Bund wrote at 2004-5-11 18:07 +0200:
>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)
>| |
>| [x]
> ...
>(self goes to the right, parent down). The important thing is, that
>aq_inner of this is the same tree.

Sure, because "aq_self" ("b") is not a wrapper.
This is the criterion for an "aq_inner" object.



aq_inner would give you


as in this case, "self" is still a wrapper.


More information about the Zope mailing list