On Sun, Nov 30, 2003 at 03:26:16AM -0500, Raymond Hettinger wrote:
Then let's kill all use of backticks in the standard library.
a lot of them.
As always, be careful with doing peephole changes to the standard library -- historically, we've seen a 1-5% error rate in these change sets that persists for months or years afterwards.
FWIW, Walter and I did a bunch of these for Py2.3 and had excellent success because of a good process. Some ideas are:
start it now (don't wait until a beta release).
skip the packages like email which are maintained separately
think out ways it could go wrong (operator precedence, double
backticks, escaped backticks, backticks inside strings or comments, etc.).
- do it manually (not brainlessly), then do it with automation to
compare the results.
Here's an idea for verifying an automated translator:
Instead of converting `expr` to repr(expr) convert it first to (`expr`) or even (`(expr)`) and make sure it still compiles into exactly the same bytecode. It should catch all the problem you mention except backticks in comments and strings. These need manual inspection.