A desperate lunge for on-topic-ness

Zero Piraeus schesis at gmail.com
Thu Oct 18 17:36:57 EDT 2012


:

On 18 October 2012 11:55, Den <patentsvnc at gmail.com> wrote:
> [...] I'm amused by the whole question, and others related
> to PEP8.  A quick aside, the width of our roads all go back to the
> width of a two horse rig.  The suggested maximum of 80 characters goes
> back to teletype machines, and IBM cards, and character based
> terminals [...]

... and the decisions made back in the day about line length on
teletypes etc. were informed [perhaps unconsciously] by the rules of
printed literature - and *those* rules have a *lot* of accumulated
wisdom behind them.

Robert Bringhurst's Elements of Typographical Style is very good on
that stuff; one thing he points out is that, at root, what's
comfortable is defined by the size of the human hand, the distance we
hold a book from our eye, etc. ... and while we still live in a world
composed of physical objects, a lot of that gut feeling about what's
comfortable carries across into the digital world.

The accepted rule in print is that lines of prose should be between 45
and 90 characters, with 66 being ideal for readability. Code is not
prose, and the combination of fixed-width and much more variable line
length aids readability, but however it came about, ~80 does seem to
more or less work as a limit.

I'm pretty slavish about adhering to PEP 8 these days. Programmers are
an opinionated bunch, and we all, given the opportunity, will come up
with our own set of obviously [goddammit] correct rules. Having a
broadly sensible, authoritative set of guidelines that we grudgingly
agree to follow makes working with other coders easier IMO.

 -[]z.



More information about the Python-list mailing list