On 4/3/06, Michael Hudson firstname.lastname@example.org wrote:
I'm not sure the problem is so much that anyone _wants_ to support resurrection in __del__, it's just that it can't be prevented.
Well, Java has an answer to that (at least I believe Tim Peters told me so years ago): it allows resurrection, but will only call the finalizer once. IOW if the resurrected object is GC'ed a second time, its finalizer won't be called. This would require a bit "__del__ already called" on an object, but don't we have a whole word of GC-related flags?
-- --Guido van Rossum (home page: http://www.python.org/%7Eguido/)