Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!roy From: Roy Smith Newsgroups: comp.lang.python Subject: Re: PEP 8 : Maximum line Length : Date: Tue, 13 May 2014 08:09:37 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Lines: 27 Message-ID: References: NNTP-Posting-Host: localhost X-Trace: reader1.panix.com 1399982977 4000 127.0.0.1 (13 May 2014 12:09:37 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Tue, 13 May 2014 12:09:37 +0000 (UTC) User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Xref: csiph.com comp.lang.python:71477 In article , 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) The problem here is not so much that you've exceeded 80 columns, but that there's no logical structure which gives your eyes (and your brain) hints about how to parse this. I would start by adding some white space > p = Subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE) now, at least, it's easier to see where each argument stops and the next one starts. But, I would really break this up into multiple lines > p = Subprocess.Popen(shlex.split(cmd), > stdout=subprocess.PIPE, > stderr=subprocess.PIPE)