Guido sees the light: PEP 8 updated

Rustom Mody rustompmody at gmail.com
Sat Apr 16 23:44:06 EDT 2016


On Saturday, April 16, 2016 at 10:22:10 PM UTC+5:30, Marko Rauhamaa wrote:
> Larry Martell :
> 
> > I have worked for many companies where you are required to get a clean
> > run of pep8 on your code before your pull request will even be
> > considered for approval. I don't agree with this at all, as I think it
> > makes the code very ugly, especially enforcing the max line length.
> 
> Agh, I was with you until your last remark.


Count me in the "80-chars is ante-deluvian gunk" camp

> 
> A max line length of 79 characters is among the *only* rigorous
> principles I judge coding style on.
> 
> It comes with the maxim that one function must be visible at once on the
> screen.

Thats a strange self-contradiction.  I wrote this:
 http://blog.languager.org/2012/10/layout-imperative-in-functional.html
to make the case against PEP8 style line length strictures.
Which has the SAME code formatted in two styles:

--  < 80 cols, 48 lines
--  115 cols 37 lines

Clearly the 115 cols is MORE fittable in a page than the 80 cols
[Though my argument for that is based on other structural/semantic principles]

Should mention an irony here though:
When I first wrote it, the examples were inline and blogger was breaking the lines randomly completely invalidating my point.
IIRC blogger was breaking at 68 cols -- invalidating the 80 cols from the other side.
Clearly 80 cols is more portable than longer.
However if we literally implement the view that different people use different
technologies -- AND WE SHOULD SUPPORT THEM ALL -- then notepad becomes the
ineluctable gold standard.



More information about the Python-list mailing list