Pep8 for long pattern

Rick Johnson rantingrickjohnson at gmail.com
Tue Mar 27 19:37:46 EDT 2018


On Tuesday, March 27, 2018 at 4:02:37 PM UTC-5, Dan Stromberg wrote:
> On Tue, Mar 27, 2018 at 8:18 AM, Michael Torrie <torriem at gmail.com> wrote:
> > But when it's exactly what you need, why do you need to
> > shoehorn the expression into 79 characters?  Seems
> > pointless in a case like this. PEP8 is a guideline, not an
> > absolute rule.  It's okay to bend it a bit in cases like
> > this.
> 
> I think PEP8 specifying a max of 80 columns is very silly.
> Even an old VT220 terminal could do 132 columns.

And just think how many columns you could do with 1pt font!
And while i admit i enjoy coding with my nose pressed
against the monitor as much as the next "guyal"[1], just uh,
be sure to keep a good optometrist on retainer, eh pal?

> My understanding is that PEP8 requires 80 columns because a
> tiny, tiny, tiny minority of Python developers wanted to be
> able to put 3 editors next to each other horizontally,
> without wrapping.

Stacking horizontal windows three deep is all the rage, but
the reason has more to do with easy reading. Long lines are
difficult to read. And when your eyes do a linefeed at the
end of a 200 character long line, there's no guarantee
you'll end up starting on the next line. Sometimes you'll
find yourself three lines down, while others, back at the
start of the same line. And that's annoying.

> I like to check my code with pycodestyle, but I always
> override that dang 80 column requirement.

Certainly your decision. But please do try to maintain as
much of PEP8 as you can tolerate. Most of it (~75%) is
really good advice.

[1] "guy" and/or "gal" = "guyal"



More information about the Python-list mailing list