Tabnanny really useful?

John Roth newsgroups at jhrothjr.com
Tue Dec 21 16:06:12 CET 2004


"Steve Holden" <steve at holdenweb.com> wrote in message 
news:qIVxd.57751$Jk5.26179 at lakeread01...

> 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
>
> regards
>  Steve
> -- 
> Steve Holden               http://www.holdenweb.com/
> Python Web Programming  http://pydish.holdenweb.com/
> Holden Web LLC      +1 703 861 4237  +1 800 494 3119 




More information about the Python-list mailing list