PEP8 79 char max

Steven D'Aprano steve+comp.lang.python at
Mon Jul 29 23:09:10 CEST 2013

On Mon, 29 Jul 2013 15:43:49 -0400, Devyn Collier Johnson wrote:

> In Python programming, the PEP8 recommends limiting lines to a maximum
> of 79 characters because "There are still many devices around that are
> limited to 80 character lines"
> ( What devices
> cannot handle 80 or more characters on a line? 

The only one I can think of is actual xterms (Ctrl-Alt-Function key 
terminals on Unix and Linux). But I think that's actually a red-herring. 
At least for me, I don't care about devices with 80 character lines. 
(Smart phones? Or is that more likely to be 40 character lines?)

I care about being able to put multiple windows side-by-side, or a single 
window with code in one pane and a class map at the side. I care about 
being able to copy and paste code into an email, or Usenet post, without 
it being mangled. I care about *never* having to scroll left-to-right in 
order to read a line.

And most of all, I care about lines being short enough to read without 
eye strain and mental fatigue from excessive horizontal width.

> Would following this
> recommendation improve script performance?

No, it is irrelevant to performance, except performance of the reader.


More information about the Python-list mailing list