[Python-ideas] 80 character line width vs. something wider

spir denis.spir at free.fr
Thu May 21 09:20:54 CEST 2009


Le Thu, 21 May 2009 12:41:20 +1000,
Ben Finney <ben+python at benfinney.id.au> s'exprima ainsi:

> You assume that human eyesight and capacity to comprehend complex syntax
> will also scale with the display resolution. That doesn't seem a
> well-supported assumption.
> 
> I think average human ability to perceive lines of text, having remained
> pretty much constant over the history of computing so far, will tend to
> remain fairly constant for the foreseeable future, and hence the
> 80-column limit will continue to be a good standard for Python code.

You are certainly right here, but this applies to "busy" line-width, which is most often < 50 chars (left-side spacing excluded), even when overall line width is > 80. Breaking lines that sensibly mirror the semantics and hold less than 50 content characters, only because of an arbitrary right-side limit, prevents confortable reading.

Also, most wider lines go over the limit because they contain long literals (strings, lists) which are not complex conceptually -- they just eat horizontal space. Breaking the line in such cases hinders human parsing, it does not help it.

To sum up, the human parsing factor rather requires intelligently relaxing limits, not the contrary.

Denis
------
la vita e estrany


------
la vita e estrany



More information about the Python-ideas mailing list