[Python-Dev] python -t gets confused?

Tim Peters tim_one@email.msn.com
Sat, 1 Apr 2000 23:14:23 -0500


[Vladimir Marangozov]
> The tab/space checking code in the tokenizer seems to get confused
> by the recently checked in test_pyexpat.py
>
> With python -t or -tt, there are inconsistency reports at places where
> there doesn't seem to be one. (tabnanny seems to be confused too, btw :)

They're not confused, they're simply reporting that the indentation is
screwed up in this file -- which it is.  It mixes tabs and spaces in
ambiguous ways.

> ...
> I'm not an expert of the tokenizer code, so someone might want to look
> at it and tell us what's going on. Without -t or -tt, the code runs fine.

If you set your editor to believe that tab chars are 4 columns (as my
Windows editor does), the problem (well, problems -- many lines are flawed)
will be obvious.  It runs anyway because tab=8 is hardcoded in the Python
parser.

Quickest fix is for someone at CNRI to just run this thru one of the Unix
detabifier programs.