does python have useless destructors?
Peter Hansen
peter at engcorp.com
Thu Jun 10 21:51:40 EDT 2004
Aahz wrote:
> In article <-oadnfu_sdwTUFrdRVn-hw at powergate.ca>,
> Peter Hansen <peter at engcorp.com> wrote:
>
>>Michael P. Soulier wrote:
>>
>>>myfile = open("myfilepath", "w")
>>>myfile.write(reallybigbuffer)
>>>myfile.close()
>>
>>... immediately raises a warning flag in the mind of an
>>experienced Python programmer.
>
> Depends on the circumstance, I'd think.
If you mean that for simple scripts, it looks fine, then
I agree. Otherwise, maybe I wouldn't. ;-)
More information about the Python-list
mailing list