[Python-Dev] Design question: call __del__ only after successful
__init__?
Christian Tismer
tismer@tismer.com
Fri, 03 Mar 2000 19:51:55 +0100
Guido van Rossum wrote:
>
> OK, so we're down to this one point: if __del__ resurrects the object,
> should __del__ be called again later? Additionally, should
> resurrection be made illegal?
[much stuff]
Just a random note:
What if we had a __del__ with zombie behavior?
Assume an instance that is about to be destructed.
Then __del__ is called via normal method lookup.
What we want is to let this happen only once.
Here the Zombie:
After method lookup, place a dummy __del__ into the
to-be-deleted instance dict, and we are sure that
this does not harm.
Kinda "yes its there, but a broken link ". The zombie
always works by doing nothing. Makes some sense?
ciao - chris
--
Christian Tismer :^) <mailto:tismer@appliedbiometrics.com>
Applied Biometrics GmbH : Have a break! Take a ride on Python's
Kaunstr. 26 : *Starship* http://starship.python.net
14163 Berlin : PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
we're tired of banana software - shipped green, ripens at home