In message <[email protected]>, gelonida wrote:
> I've been told, that following code snippet is not good.
>
> open("myfile","w").write(astring) ...
I do that for reads, but never for writes.
For writes, you want to give a chance for write errors to raise an exception
and alert the user, instead of failing silently, to avoid inadvertent data
loss. Hence the explicit close.
--
http://mail.python.org/mailman/listinfo/python-list
