[SciPy-dev] tidy up code before 1.0
Fernando.Perez at colorado.edu
Thu Feb 2 18:26:11 CST 2006
Gary Ruben wrote:
> Just a comment that I noticed the numpy source might benefit from being
> run through pychecker, which finds some unused references. I also
> noticed some TAB characters have found their way into the source. I
> didn't check the scipy source. PyLint might find different things too.
> And perhaps a run through with splint for the C source.
+1. In particular, TABs should be absolutely forbidden: mixed tab/space code
is a recipe for disaster in python (it's happened to me in the past with
patches for ipython, and the resulting bugs can be maddening to track, as the
code may actually appear correct on your screen depending on your particular
choice of tab/space display settings).
tabnanny.py and 'untabify.py -t 4', from /usr/lib/python2.X/Tools/scripts, are
our friends here.
PS - I'm not going into a tab-vs-spaces war here: the fact is that numpy is
(as the python stdlib) mostly 4-space-indent code, so all contributed code
should follow this standard, regardless of the contributor's personal preferences.
This page has my basic ipython contributor guidelines:
Feel free to copy any of this you may like to the scipy dev wiki.
More information about the Scipy-dev