PEP8 and 4 spaces

Marko Rauhamaa marko at pacujo.net
Tue Jul 8 05:09:45 EDT 2014


Steven D'Aprano <steve at pearwood.info>:

> * editors don't handle tabs correctly

But you said yourself:

> I'm not sure there actually *is* such a thing as "default semantics"
> for tabs.

What is "correct" handling of ASCII TAB characters in a text file?

The unix tradition is to let the TTY interpret the TABs. Utilities such
as "ed", "cat", "diff" or "gcc" don't interpret or process TABs in any
way but simply output them together with the rest of the text.

And the TTY tradition is to have TAB stops at every 8 columns (by
default).

So this question has little to do with text editors except in that your
editor should display your program roughly the same way as "lpr" prints
it out.


Marko



More information about the Python-list mailing list