[Pythonmac-SIG] Selecting in BBEdit & Python Indenting style(spaces)

Rob Managan managan at llnl.gov
Wed Nov 30 02:02:12 CET 2005


>On Nov 29, 2005, at 4:54 PM, Louis Pecora wrote:
>
>>  Kent Quirk wrote:
>>
>>>  Just because there seems to be an orgy of people agreeing that 
>>>  Tabs are the One True Way, I feel a need to point out that there 
>>>  are those of us who fervently believe that Tabs Are Evil. The 
>>>  reason is that tabs are interpreted differently in different 
>>>  places, and they're indistinguishable from spaces upon casual 
>>>  inspection. So the visual appearance of mixed spaces and tabs can 
>>>  be highly misleading and confusing, especially in an environment 
>>>  with multiple developers, each of whom may have a different tab 
>>>  setting.
>>>
>>>  Spaces are unambiguous. As it's the meaning of the source that 
>>>  matters, and editors can be tuned to personal taste, I'm in favor 
>>>  of leaving the source clean of tabs and letting people tweak their 
>>>  editors to their own liking.
>>>
>>>  In my view, Python should consider leading tabs to be a syntax 
>>>  error (and yes, I know about the -tt switch).
>>
>>  I'm not sure what you are talking about, but I meant that Tabs can be
>>  set in an editor (e.g. BBEdit) to _display_  at any number of spaces,
>>  but the editor does not put in real spaces.  It just displays the Tabs
>>  as indentations whose width you choose.  There's still only one
>>  character (a tab) there in the file.  Delete works properly.  That's
>>  pretty unambiguous to me.  So if someone else on your project likes to
>>  display using 8-space tabs and you like 2-space tabs it doesn't 
>>  matter.
>>  You can look at his files and edit them back and forth and nothing 
>>  gets
>  > confused.  Why is that so bad?
>

Because in a mixed environment some one will take a file that has 
tabs and add spaces or vice versa. As soon as lines have a mixture of 
tabs and spaces then the display does ugly things when you change 
editors.

I run into this all the time in C with those I develop with. We try 
to keep it to spaces but some people forget that their editor puts in 
a tab automatically for 8 spaces and then spaces after that to column 
12 for example. Then my editor which sets tabs to 4 spaces has 
indentation all messed up.
-- 
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Rob Managan               email managan at llnl.gov
LLNL                      phone: 925-423-0903
P.O. Box 808, L-095       FAX:   925-422-3389
Livermore, CA  94551-0808



More information about the Pythonmac-SIG mailing list