On 2014-02-06, msus...@gmail.com <msus...@gmail.com> wrote: > I had a bug in a Python script recently. The code in question was something > along the lines of: > > if a == 1: > x = y > else: > x = z > y = z + y > z = z + 1 > > While editing this file I accidentally pushed TAB on the line > with 'y = z + y'. > > Any suggestion on how to avoid this type of error in the future?
The best advice is to pay closer attention to what you're doing. Look at the code while you're editing, not your fingers. Before you commit the change, spend some time looking carefully at it to verify that changes were intentional. -- Grant Edwards grant.b.edwards Yow! I left my WALLET in at the BATHROOM!! gmail.com -- https://mail.python.org/mailman/listinfo/python-list