Why no open(f, "w").write()?

Isaac To kkto at csis.hku.hk
Wed May 29 22:47:05 EDT 2002


>>>>> "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.

Regards,
Isaac.



More information about the Python-list mailing list