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

Bob Ippolito bob at redivi.com
Tue Nov 29 23:59:07 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?

Why does it matter?  In any reasonable text editor, you hit tab or  
backspace when changing indentation levels regardless of whether your  
document uses spaces or tabs.

If variable display really was important, surely it would be a  
supported feature in at least one Python IDE to expand/collapse 4- 
space to the desired width.  As far as I know, it's not.

Anyway, this discussion is pointless.  4-space indentation is the way  
to write Python code, and that's not going to change.  Ever.

-bob



More information about the Pythonmac-SIG mailing list