PEP8 and 4 spaces

Dan Sommers dan at tombstonezero.net
Mon Jul 7 07:35:41 CEST 2014


On Mon, 07 Jul 2014 11:00:59 +1000, Ben Finney wrote:

> The makefile syntax is one of the excellent examples of why it's a
> terrible idea to use tab characters in source code. It's also an
> excellent example of how a poor design decision (a line beginning with
> U+0020 SPACE is semantically different from a line beginning with
> U+0009 CHARACTER TABULATION) can be irrevocable – the syntax can't be
> changed now, without breaking compatibility for countless makefiles
> out there already – and cause endless confusion and wasted effort
> dealing with it.

When makefile syntax came into being, there were ASCII TAB characters,
with a value of 9, and ASCII SPC characters, with a value of 32 (and
there may not even have been those).  The former is a "control"
character, which has specific semantics associated with it; the latter
is a "printable" character, which is usually printed and interpreted as
itself (although in this particular case, the printed representation is
hard to see on most output devices).

This mailing list doesn't seem to mind that lines beginning with ASCII
SPC characters are semantically different from lines beginning with
ASCII LF characters, although many detractors of Python seem unduly
fixated on it.



More information about the Python-list mailing list