Do you think tabnanny is a useful piece of code now? I used it a lot when
I first started using Python, and still run it over code from unknown
sources (no pun intended) from time to time.
I think it's a lot less useful today than it was a few
years ago, but it's still useful if you're stuck with an
editor that doesn't give you a robust set of options,
or if you've got to check a lot of modules in a library.
I think most python-aware editors have included
the needed functionality, or at least some reasonable
approximation.
I know what I would like to see in an editor:
First, it autodetects whether the module uses
tabs consistently, spaces consistently or a
mixture. If it uses tabs consistently, it then
uses the current default.
If it uses spaces consistently, it should also
autodetect the indentation setting in use in
the module and offer to change it if it's
different from the current default indentation
setting.
If it's inconsistent, it should make an attempt
to deduce the model the creating software
used; if it can it should change it to the
default setting without complaining. Otherwise
it should complain.
John Roth