Nils Oliver Kröger <[EMAIL PROTECTED]> writes:
> If you want to "reuse" the file, you will have to delete your classes
> instance explicitly using the del statement ... this will also call
> the destructor.
Sometimes, but not always. The `del' statement simple removes the
reference to the instan
Thanks; I'll give it a try.
On 8/22/07, Nils Oliver Kröger <[EMAIL PROTECTED]> wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Robert Dailey schrieb:
> > Hi,
> >
> > I'm wondering where the most appropriate location is to cleanup class
> > objects. For example, i have a file handle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Robert Dailey schrieb:
> Hi,
>
> I'm wondering where the most appropriate location is to cleanup class
> objects. For example, i have a file handle as an instance attribute in one
> of my classes and I need to call f.close() on it when the class objec
Hi,
I'm wondering where the most appropriate location is to cleanup class
objects. For example, i have a file handle as an instance attribute in one
of my classes and I need to call f.close() on it when the class object falls
out of scope. Any ideas? I've tried __del__() but I don't remember this