osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python indentation (3 spaces)


On 13-10-18 09:37, Peter J. Holzer wrote:
> On 2018-10-09 09:55:34 +0200, Antoon Pardon wrote:
>> On 08-10-18 19:43, Peter J. Holzer wrote:
>>> On 2018-10-08 10:36:21 +1100, Chris Angelico wrote:
>>>> 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?
> Tabs are easy to catch. If a file contains a tab, reject it.
>
> Spaces aren't, because spaces are everywhere.

Spaces that replaced a tab by accident, are easy to catch too. They are all
those lines that show up when you do a diff with the previous version that
shouldn't show up.

-- 
Antoon.