Defining VCL-like framework for Python
Alexander Staubo
nospam-alex at mop.no
Sat May 22 09:51:59 EDT 1999
In article <Pine.WNT.4.04.9905211029100.289-100000 at rigoletto.ski.org>,
da at ski.org says...
> On Fri, 21 May 1999, Alexander Staubo wrote:
>
> > Unfortunately, as I pointed out earlier, cyclic references make
> > parent/child relationship hard to implement cleanly. The best workaround
> > I've found is to have classes implement a common "pre-destructor" that
> > must clean up any external references to prepare it for destruction.
>
> FYI: using environmental acquisition seems a natural for a parent-child
> relationship, and solves many cyclic reference problems. I'd point you to
> a URL of Jim Fulton's code for acquisition, but Digital Creations just
> redid their website and I can't find it anymore. I'm cc'ing
> webmaster at digicool, hoping that they'll let you know where those documents
> have gone.
I agree. I remember the DC document you mention. Personally I'm so
steeped in the traditional containment systems my mind is still
struggling to "accept" using acquisition in this context, but I see that
it's vastly superior, at least for this project. I'm definitely going to
have a stab at it -- at least it will cure my circular-ref ills.
--
Alexander Staubo http://www.mop.no/~alex/
"Give me an underground laboratory, half a dozen atom smashers and a beautiful
girl in a diaphanous veil waiting to be turned into a chimpanzee, and I care
not who writes the nation's laws." --S. J. Perelman
More information about the Python-list
mailing list