[Python-Dev] Other library code transformations

Barry A. Warsaw barry@zope.com
Mon, 3 Jun 2002 05:48:26 -0400

>>>>> "GvR" == Guido van Rossum <guido@python.org> writes:

    >> What about "foo = foo + 1" => "foo += 1"?

    GvR> I'm not for making peephole changes like this.  It's easy to
    GvR> make mistakes (even if you run the test suite) if you don't
    GvR> guess the type of a variable right.  I think it's better to
    GvR> bring code up to date in style only as part of a serious
    GvR> rewrite of the module containing it -- so you can fix up all
    GvR> different aspects.  It's often kind of strange to see a
    GvR> modernization like this in code that otherwise shows it
    GvR> hasn't been modified in 5 years...

I agree!  If it works, don't fix it.  

I was responding to this

    > While you're at it: could you also write up all these little
    > "code cleanups" in some file so that Andrew can integrate them
    > in the migration guide ?!

I think it's a nice "code cleanup" that is worth noting in a migration