PEP 8 : Maximum line Length :

Rustom Mody rustompmody at gmail.com
Tue May 13 07:52:26 EDT 2014


On Tuesday, May 13, 2014 12:37:24 PM UTC+5:30, Ganesh Pal wrote:
> Hi  Team ,
> 
> 
> what would be the best way to intent the below line .
> 
> I have few lines in my program exceeding the allowed maximum line Length of 79./80 characters 
> 
> 
> Example 1 :
> 
> 
>    p = Subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr=subprocess.PIPE)


First rule of python-list: Pay careful attention to Peter Otten.

That said...

80-character limit?!

Sheesh! A relic of the days when terminals were ASCII and 80x24

I wrote about this
http://blog.languager.org/2012/10/layout-imperative-in-functional.html

While its mostly haskell oriented, the comments are amusingly related to this
question in any language:

Comment:
  It is kind of ironic that the blog format wraps your wide code examples at 65 
  chars.

What this goes to show is that while 80 is ridiculously low by most displays today,
it is too high for many web/mailing-list fora.

Of course a standard helps in removing superfluous variations.

Still... its 2014 and 80-columns is as current and relevant as ASCII.

PS.

Last rule of python list: Always listen to Peter Otten.



More information about the Python-list mailing list