Python indentation (3 spaces)

Antoon Pardon antoon.pardon at vub.be
Tue Oct 9 03:55:34 EDT 2018


On 08-10-18 19:43, Peter J. Holzer wrote:
> On 2018-10-08 10:36:21 +1100, Chris Angelico wrote:
>> TBH, I think that tab width should be up to the display, just like the
>> font. You're allowed to view code in any font that makes sense for
>> you, and you should be able to view code with any indentation that
>> makes sense for you. If someone submits code and says "it looks
>> tidiest in Times New Roman 12/10pt", I'm sure you'd recommend making
>> sure it doesn't matter [1]; if someone submits code and says "you have
>> to set your tabs equal to 5 spaces or it looks ugly", you'd say the
>> same, right?
>>
>> How wide my indents are on my screen shouldn't influence your screen
>> or your choices.
> Theoretically I would agree with you: Just use a single tab per
> indentation level and let the user decide whether that's displayed as 2,
> 3, 4, or 8 spaces or 57 pixels or whatever. 
>
> In practice it doesn't work in my experience. There is always someone in
> a team who was "just testing that new editor" and replaced all tabs
> with spaces (or vice versa) or - worse - just some of them.

Isn't that caugth in the process of commiting to version control?

-- 
Antoon Pardon.




More information about the Python-list mailing list