[Python-ideas] PEP 8 update on line length

David Mertz mertz at gnosis.cx
Mon Feb 18 23:48:37 EST 2019


You either have much better eyes to read tiny fonts than I do, or maybe a
much larger monitor (it's hard for me to fit a 30"" monitor in my laptop
bag).

But that's not even the real issue. If the characters were in giant letters
on billboards, I still would never want more than 80 of them on a line
(well, rarely, I violate PEP 8 sometimes). Centuries if not millennia of
experience with writing show that cognitive burden goes up exponentially,
not linearly, as lines get to be more than about 60 characters.

This is why it's not just code on screen. Magazines, books, wall signs,
billboards, and every other written form, insists on similar limits on line
length. In printed matter this often means using multiple columns to avoid
overly long lines. The issue isn't resolution or size, it's that the human
brain simply doesn't process long lines of text will.

On Mon, Feb 18, 2019, 11:38 PM Simon <simon.bordeyne at gmail.com wrote:

> Hello,
>
> I'd like to propose an update to PEP8. Indeed, the 80 characters per line
> guideline is, I feel, outdated.
>
> I understand the need for it, back when monitors were small, and everyone
> coded on terminals, but nowadays, I feel like that guideline is more of a
> hinderance, and that it promotes poor code.
>
> Indeed, people abiding by this rule tend to choose shorter variable names,
> reduce the amount of indentation, and other tricks to just keep the
> character count under 80. I think a 100 or even 120 suggested characters
> per line count is much more realistic by today's standards. It still allow
> for the code to be completely displayed, even on just half of a screen.
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190218/0e87c13c/attachment.html>


More information about the Python-ideas mailing list