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

Python indentation (3 spaces)

On 10/7/2018 2:35 PM, Ryan Johnson wrote:

> The logic is that all the text editors that are designed to work with Python code will KNOW to replace tab input with 3 characters, while still parsing the \t tab character as 4 characters;

What do you mean by 'parsing a tab character as 4 characters'?  If the 
editor *converts* the tab to k spaces in its buffer, then k must be the 
same number as when the user types a tab, and there is no tab left to 
worry about.  If the editor put the tab into its buffer (and saves it 
with tabs), then what users on particular display devices depends on 
what the device does with tabs.

Theoretically, all tabs might seem like a good idea, but since 0 spaces, 
1/2 inch, and 8 spaces are possible display results, in addition to a 
users custom setting, this does not work except in a circumscribed 
environment.  That leaves space indents and no tabs except in strings 
where needed.

Terry Jan Reedy