On Tue, Apr 26, 2016 at 7:26 AM, John Gordon <gor...@panix.com> wrote:
> It's much easier to create a new file and then rename it afterwards,
> instead of rewriting the original file.

And more importantly, it's safer. If anything happens to your process
while it's doing its work, you'll have a junk file sitting around, but
you won't have lost everything. If you overwrite the existing file,
you (often) depend on completely writing out the content you have in
memory.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to