Previously Charlie Clark wrote:
> Am 30.10.2007 um 17:40 schrieb Wichert Akkerman:
> >__init__ is indeed the wrong place: when the instance is created it is
> >not placed in an acquisition context yet.
> That would indeed explain things!!! Is it okay to call a method which  
> does this from __init__ ?

No, since the acquisition context is only created when the object is
insert into the hierarchy somewhere (sloppy terminology here, I know).
And that can only happen after the instance has been fully created.

As an example:

   obj = Object()
   # obj has no acquisition context
   folder.obj = obj
   # folder.obj will have an acquisition context

In other words: in __init__ and everything you call from __init__ the
instance will not have an aq context. The context does not magically


Wichert Akkerman <[EMAIL PROTECTED]>    It is simple to make things.                   It is hard to make things simple.
Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to