PEP 8 and extraneous whitespace

Thomas 'PointedEars' Lahn PointedEars at web.de
Thu Jul 28 01:24:19 CEST 2011


Chris Rebert wrote:

> John Gordon wrote:
>> Neil Cerutti writes:
>>> You can fit much more code per unit of horizontal space with a
>>> proportionally spaced font. As a result, that issue, while valid,
>>> is significantly reduced.
>>
>> Is it?  I assume one major reason for the 80-character limit is to help
>> the poor sod who will eventually get stuck working with your code on an
>> 80-column fixed width terminal window.
> 
> What environments with that limitation are still in common use?

TTYs are present on Unices and compatible OSes everywhere today (even more 
so as Python is evolving into a more powerful replacement for Bourne-shell 
based shell command languages), and there are sophisticated graphic-mode 
IDEs (not IDLE) where you want to have more than the source code column 
visible at the same time.

Having too long code lines is detrimental to readability there, because even 
though you can scroll, horizontal scrolling is a PITA.  Automatic word-wrap, 
where available, really is not a solution; it is a bad workaround to a 
problem caused by the original author of the source code that can be easily 
avoided by them taking more care while coding.

> It's not the '70s anymore; I think we can safely increase the max
> column width a bit.

You're wrong.  It is not only an issue of output device/window, but also 
simply of readability.  In particular, humans have difficulties reading text 
that is larger than about 60 characters, both due to constrainted view angle 
and increased eye movement from the end of one line to the beginning of the 
next one (the greater that distance, the harder to keep track of the text).  
One can learn from the newspaper and pocketbook publishers how easily 
readable text should be formatted (but one must not overdo as some of them 
do).
 
-- 
PointedEars

Bitte keine Kopien per E-Mail. / Please do not Cc: me.



More information about the Python-list mailing list