[Zope-dev] Removing the acquisition wrapper from an object(Python script)

Gilles Lenfant gilles@pilotsystems.net
Thu, 1 Aug 2002 23:56:36 +0200


----- Original Message -----=20
From: "Leonardo Rochael Almeida" <leo@hiper.com.br>
To: "Zope Developers list" <zope-dev@zope.org>
Sent: Thursday, August 01, 2002 11:37 PM
Subject: Re: [Zope-dev] Removing the acquisition wrapper from an =
object(Python script)


> 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.
>=20
> 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:
>=20
> non_implicit_obj =3D obj.aq_explicit
>=20
> obj.some_attr
>=20
> or just:
>=20
> obj.aq_explicit.some_attr
>=20

Leo,

Many thanks, exactly what I needed !

I didn't find much doc about these aq_xxx methods/functions. Where can I =
find this ?

Cheers

--Gilles