[Python-Dev] Slash and burn in Tools/scripts. Objections?

Greg Ewing greg@cosc.canterbury.ac.nz
Thu, 14 Mar 2002 18:20:23 +1300 (NZDT)


Tim Peters <tim.one@comcast.net>:

> Their backup code is arguable.  It's good to ensure that the new
> file can be written before removing the original file, and good to
> do some form of backup.

Tools which modify files in-place make me nervous,
even when they do keep backups. When writing such a
thing, I much prefer to arrange it so that the new
files are written to a separate, parallel directory
structure. When finished, I can then look at the
results, make sure they're okay, and then replace 
the originals with them. (If needed -- sometimes
I want the results in a different directory
anywa.)

I feel much more comfortable doing things this way,
since if the process fails half way through for some
reason, I can just re-do the whole thing without
worrying about whether it will try to re-process
things that have already been processed, etc.

So if you're going to make some sort of library
module for this, I'd suggest you don't design it to
encourage people to make in-place-modifying tools.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+