try: finally: question
Peter Hansen
peter at engcorp.com
Fri Jul 9 08:53:24 EDT 2004
Nick Smallbone wrote:
> "djw" <donald.welch at hp.com> wrote:
>>I would agree (with regards to straight Python), but I disagree when you
>>include I/O. The I/O I am interacting with requires cleanup. Simply
>>allowing the device object I created to go out of scope and be
>>automatically cleaned up does not cause the I/O to be cleaned up properly.
>>
> Why don't you define __del__() in the object so it can do its own cleanup?
> Apologies if I've missed something important.
Yeah, all the past and recent threads talking about how you can't
really rely on __del__(). ;-)
-Peter
More information about the Python-list
mailing list