On Oct 27, 5:40 pm, Scott David Daniels <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > It seems to me that deleting local instances before imported modules
> > would solve the problem. Is it not possible for the interpreter to get
> > this right? Or are there cases where this would break
[EMAIL PROTECTED] wrote:
It seems to me that deleting local instances before imported modules
would solve the problem. Is it not possible for the interpreter to get
this right? Or are there cases where this would break stuff.
It seems rather unpythonic for the __del__() method to become
unpredic
It seems to me that deleting local instances before imported modules
would solve the problem. Is it not possible for the interpreter to get
this right? Or are there cases where this would break stuff.
It seems rather unpythonic for the __del__() method to become
unpredictable at exit.
--
http://ma
This is expected behavior (see http://www.python.org/doc/essays/cleanup)
but it is definitely a wart of Python. The best advice I can give you
is *never* use __del__. There are alternatives,
such as the with statement, weak references or atexit.
See for instance http://code.activestate.com/recipes
Hi
i have i have a class that makes temp folders to do work in. it keeps
track of them, so that in the __del__() it can clean them up. ideally
if the user of the module still has objects left at the end of their
program, they should be automatically cleaned up. in my destructor i
had a call to shu