Who are the "spacists"?

Mikhail V mikhailwas at gmail.com
Sun Mar 19 16:11:31 EDT 2017

On 18 March 2017 at 22:50, Nathan Ernst <nathan.ernst at gmail.com> wrote:
> My issue with using spaces instead of tabs, is that, as mentioned earlier in
> the thread, everyone has their own preferences on indentation. I've worked
> on teams where different developers used 2, 3 & 4 spaces as indentation.
> Obviously, if you're using spaces, several of the members will be unhappy.
> Tabs have the benefit that most editors used by developers allow the
> adjustment of the width of a tab. If you use tabs, everyone can be happy
> with the visual presentation of their code.
> My rule of thumb: tabs for indentation, spaces for alignment (i.e. trying to
> line up anything after a non-whitespace character on a single line).
> Regards,
> Nathan

Trying to line up things after a non-whitespace character, e.g. like this?

myList = [
    ["a",                         "b", "c"],
    ["mess up your alignment",     "b", "c"],
    ["a",                         "b", "c"]

Well there is no easy solution possible, especially if you want it
to look exactly the same on all computers and editors.
Before something like elastic tabstops will be a standard,
it will continue to confuse people.
Spaces are still one of the worst solutions, although it will
give same results on monospaced editors. Changing
a long string in above example means again ASCII art exercises,
and it is not funny.
I'd just leave it as is or use tabs, despite they
can look different on other editor.

Most importang thing, one should just stop thinking
'monospaced'. Monospaced text rendering is an artifact,
which exist on a very short time period in history.
At best, one should just imagine it should not exist, and is
just a temporary inconvinience. Actually it lasts already much
longer than I would expect.

So for column alignment technically correct IMO are single tabs
which are rendered depending on the context, i.e. this is
like elastic tabstobs work, IIUC.
On the other hand one should not edit spreadsheets
in a text editor. If one does a lot of work on tables,
then use appropriate softwre, e.g. Excell.


ine up anything after a non-whitespace character

More information about the Python-list mailing list