On Thu, 2002-08-01 at 14:38, Gilles Lenfant wrote:
> [...]
> Now I'm always looking for an alternate way to get rid of the acquisition wrapper 
>and access only the objects own props.

To access an object's own props (and get an error if it doesn't find
them instead of looking up the aq-chain) you don't need to remove it's
acquisition wrappers, you just need to tell him not to use acquisition
implicitly. The way you do that is to ask the object for a
non-implicit-acquisition version of itself, that is, an explicit
acquisition object:

non_implicit_obj = obj.aq_explicit


or just:


for short.

This way, 'some_attr' won't be looked up in the object's acquisition

        Cheers, Leo

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

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to