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
> 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
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
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
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
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