Who are the "spacists"?

Chris Angelico rosuav at gmail.com
Mon Mar 20 03:19:07 EDT 2017


On Mon, Mar 20, 2017 at 6:01 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Steve D'Aprano <steve+python at pearwood.info>:
>
>> On Mon, 20 Mar 2017 09:50 am, Marko Rauhamaa wrote:
>>
>>> the 8-column interpretation is the only defensible use for
>>> tabs.
>>
>>
>> Oh, that's a law of physics is it?
>
> Pretty much. Try printing out your program with lpr, or sending it to
> the terminal with cat, or opening it with with Firefox.

I don't use paper, but I tried cat and Firefox. In each case, the tab
characters showed precisely as they should: as indentation. Was it the
exact same amount of indentation that showed when I originally wrote
the text in my editor? Was it displayed in the same font as my text
editor uses? Was the window the same size as that of my text editor?
Was the text colour the same everywhere? And do any of these questions
even matter?

Semantically, indentation is indentation. Obviously there are
ridiculous extremes (a tab character probably shouldn't indent by just
one pixel, nor should it normally indent by the entire width of a
line), but even those should be under the control of the viewer, not
the author. I prefer to use tabs in my code precisely *because* they
are not defined in a concrete way. The only thing I demand of the
display is that a sequence of N tabs be narrower than a sequence of
N+1 tabs.

ChrisA


More information about the Python-list mailing list