Chris Withers wrote:
> Two questions:
> 1. Is there a better way of doing the above?

Does the method aq_inContextOf() do what you want?
aq_inContextOf(other [, inner])

Check whether the object is in the context of another object, other,
meaning that the other object is in the acquisition hierarchy abovethe

An optional argument, inner, can be provided to indicate wither the
innermost wrapped object should be checked.

> 2. Is there any case where a Zope object isn't going to have a .aq_base
>    attribute?

I don't think there is any such case generally, as all Zope objects
support acquisition, and therefore inherit from Acquisition.Implicit or

However, someone could write a Product with a class that doesn't support
Acquisition. I think I'd consider that a bug in their Product, though.

Steve Alexander
Software Engineer
Cat-Box limited

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to