[Python-Dev] Python -t

Tim Peters tim_one@email.msn.com
Wed, 9 Feb 2000 23:40:49 -0500


[Skip Montanaro]
> What is the definition of "inconsistent usage"?  I just ran
> "python -tt .../compileall.py over my local library and got
> plenty of complaints.  The first example I checked seemed
> okay to me.  If I have
>
>     if foo:
> 	foo()
>
> where the first line is indented using four spaces and the second
> using a single tab, is that considered inconsistent usage?

Yes, and for a reason that would be obvious if you were me <wink>:  my mail
reader shows those lines lining up exactly.  -t looks for places where the
compiler's INDENT and DEDENT decisions differ under tab settings 4 and 8.
tabnanny.py does the same, but considering all tab settings in 1 to infinity
"simultaneously".  4 and 8 are the "practical" ones to check, since a tab
setting of 4 is as common on the platform I'm using as a tab setting of 8 is
on the one you're using.  Note that Guido's style guide says "all spaces" is
the std for distributed code.