Re: Class destruction

2007-08-22 Thread Marshall T. Vandegrift
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

Re: Class destruction

2007-08-22 Thread Robert Dailey
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

Re: Class destruction

2007-08-22 Thread Nils Oliver Kröger
-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

Class destruction

2007-08-22 Thread Robert Dailey
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