Tabnanny really useful?

John Roth newsgroups at jhrothjr.com
Mon Dec 20 14:00:39 EST 2004


"Franz Steinhaeusler" <franz.steinhaeusler at utanet.at> wrote in message 
news:envds0pfjnbenoll9nh9b4l5tca4kn9d00 at 4ax.com...
> Hi, I looked at tabnanny to check
> a python source file.
>
> But I didn't find anything, tabnanny
> is able to find, what couldn't be found
> by compile command.
>
> Or have I missed something?

Tabnanny is intended to check whether indentation
has mixed tabs and spaces. Files with mixed tabs
and spaces _can_ compile just fine if the editor
that produced them agrees with the compiler about
the number of spaces that a tab occupies.

On the other hand, such files are quite likely to
be messed up almost beyond repair if one tries
to edit them in an editor that treats tabs differently
from the one that produced it.

Files that stick to one or the other can always
be edited and compiled properly. The python
recommendation is to use spaces, but not
everyone agrees with this.

Most modern Python-aware editors handle
the situation reasonably, although you may have
to set parameters.

John Roth
>
> best regards,
> -- 
> Franz Steinhaeusler 




More information about the Python-list mailing list