Pep8 for long pattern

Rhodri James rhodri at kynesim.co.uk
Wed Mar 28 08:08:01 EDT 2018


On 27/03/18 22:02, 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.

At the risk of starting the Yorkshiremen sketch again, the *old* 
terminals couldn't :-)  The BBC Micros we used as terminals to the 
mainframe could be made to give you more columns, but no one was that 
masochistic.

> 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.

Hi :-)

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

Very rarely I will let a line leak past 80 characters when it really 
doesn't make any sense to break it up into smaller chunks.  I'm fine 
with other people going longer if they're fine with me reformatting 
their code if I have to work on it.

-- 
Rhodri James *-* Kynesim Ltd



More information about the Python-list mailing list