Little red lines in PythonWin!

Mark Hammond MarkH at ActiveState.com
Wed Mar 21 19:22:00 EST 2001


David Bolen wrote:


 > Interestingly enough when I looked at this in response to the first
 > post
 >  (I don't normally use Pythonwin), I noticed that the default  setup
 >  seems to have a tab size of 4 rather than 8.  So Pythonwin was
 > expanding
 >  literal tabs visually to a 4-position stop rather than 8,  which
 > is different from the language definition.

Yes, because I prefer them this way, and it helps keep people honest. 
Anyone who codes assuming that every editor on the planet uses 8 
character tab stops needs a dose of reality.  Every other editor I use 
has 4 character tab stops (if they didn't out of the box they do now).

 > default (with or without the red indicators) would at least present
 > a  visual indication of what the Python parser was going to "see".

I tend to be more concerned with what other editors will see.  At least 
Python will give an immediate error if it is wrong.  If you mix tabs and 
spaces in a way that Python likes, but still looks bad in many editors, 
finding out earlier is better than later IMO.

If you don't like it, simply turn it off.  However, my recomendation is 
to leave it turned on and heed its warnings regardless of the legality 
of the source to Python.

Editors that still insist tabs characters can be 8 characters now have 
about 2 decades worth of catching up to do.  However, I realize this may 
spawn its own "tabs are 8 chars the way God intended" religous thread, 
that I refuse to participate in - mine (and others with a dissenting 
opinion) minds simply can not be changed on this.

Mark.




More information about the Python-list mailing list