Re: destructor not called

2008-09-29 Thread Bruno Desthuilliers
Marcin201 a écrit : Others have already replied to your main question; in short you shouldn't rely on __del__ being called. Regardless, is there a (good) reason for having an instance reference to the method ? Without further information, that seems like a code smell. I have dictionary of fxns

Re: destructor not called

2008-09-29 Thread Marcin201
> Others have already replied to your main question; in short you > shouldn't rely on __del__ being called. Regardless, is there a (good) > reason for having an instance reference to the method ? Without > further information, that seems like a code smell. I have dictionary of fxns to do import/ex

Re: destructor not called

2008-09-28 Thread George Sakkis
On Sep 28, 12:00 pm, Marcin201 <[EMAIL PROTECTED]> wrote: > I have a class which uses a temporary directory for storing data.  I > would like that directory to be removed when the class is no longer > used.  I have tried removing the temporary directory from the class > destructor, however, it was

Re: destructor not called

2008-09-28 Thread Michel Leunen
Marcin201 a écrit : class Foo: def __init__(self): print "Hello" self.f = self.fxn Maybe self.f = self.fxn() is what you want. Note the '()'. -- Michel Leunen http://linux.leunen.com -- http://mail.python.org/mailman/listinfo/python-list

Re: destructor not called

2008-09-28 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Marcin201 <[EMAIL PROTECTED]> wrote: > I have a class which uses a temporary directory for storing data. I > would like that directory to be removed when the class is no longer > used. I have tried removing the temporary directory from the class > destructor, ho

Re: destructor not called

2008-09-28 Thread Szabolcs Ferenczi
On Sep 28, 6:00 pm, Marcin201 <[EMAIL PROTECTED]> wrote: > I have a class which uses a temporary directory for storing data.  I > would like that directory to be removed when the class is no longer > used.  I have tried removing the temporary directory from the class > destructor, however, it was n