Why no open(f, "w").write()?
Steve Holden
sholden at holdenweb.com
Thu May 30 11:01:03 EDT 2002
"Grant Edwards" <grante at visi.com> wrote ...
> In article <7iadqi9wt2.fsf at enark.csis.hku.hk>, Isaac To wrote:
> >>>>>> "Grant" == Grant Edwards <grante at visi.com> writes:
> >
> > >> The question is: When does the file get closed?
> >
> > Grant> Sometime before the program exits.
> >
> > Wrong. Sometime when the garbage collector is executed, or never if the
> > garbage collector never choose to collect that.
>
> I know of no OS that doesn't close the file when the process
> terminates.
>
So we're supposed to rely on your ignorance in making implementation
decisions now?
regards
Steve
--
-----------------------------------------------------------------------
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------
More information about the Python-list
mailing list