Why no open(f, "w").write()?
Isaac To
kkto at csis.hku.hk
Fri May 31 07:12:04 EDT 2002
>>>>> "Donn" == Donn Cave <donn at drizzle.com> writes:
Donn> You're describing a language other than C Python. In C Python,
Donn> you *may* close files and rely on other kinds of finalizations
Donn> through the reference counting garbage collector, and the result
Donn> is as timely as if you did it explicitly. That's finalization as
Donn> it ought to be, and it's a shame that other languages compromise
Donn> on that. Lots of people don't think it's important, but then the
Donn> majority of programmers think it's OK that their programming
Donn> language requires them to keep track of memory in the same way.
If you don't treat what said by the manual as the contract of the language,
then yes. The manual explicitly says that future versions of the language
might not work that way.
Regards,
Isaac.
More information about the Python-list
mailing list