[Zope-dev] Turning acquisition off

Chris Withers chrisw@nipltd.com
Wed, 06 Dec 2000 15:07:05 +0000


Ken Manheimer wrote:
> 
> On Wed, 6 Dec 2000 morten@esol.no wrote:
> 
> > Does anyone know how to disable acqusition ?
> >
> > That is, with a simple method, and not disabling the Acqusition class,
> > something like self.aq_disabled('attribute') .
> 
> I believe one way is self.aq_base['attribute'].  aq_base gets the
> unwrapped object (what got __of__'ed). 

What if the base object's not a dictionary?

> If you're not sure the thing
> is acquisition-wrapped in the first place, you'd probably want to check
> for the existing of the 'aq_base' attribute before using it...

Am I imagining things of did Jim F say he might make ac_base present in
all the acquisition classes so that kind of checking isn't necessary?

cheers,

Chris