Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'arguments': 0.07; 'completeness': 0.07; 'block.': 0.09; 'pep': 0.09; 'received:155': 0.09; '"well,': 0.16; 'bracket': 0.16; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'from:addr:jpmorgan.com': 0.16; 'indent': 0.16; 'oct': 0.16; 'parentheses': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:169.70': 0.16; 'received:169.70.184': 0.16; 'received:bankone.net': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:svr.bankone.net': 0.16; 'securities,': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'wrote:': 0.17; 'skip:u 30': 0.17; 'thu,': 0.17; 'mostly': 0.20; 'to:name:python-list@python.org': 0.20; 'received:169.254': 0.24; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'continuing': 0.27; 'accuracy': 0.27; 'lines': 0.28; "d'aprano": 0.29; 'steven': 0.29; 'received:169': 0.29; 'probably': 0.29; 'this.': 0.29; 'that.': 0.30; 'normally': 0.30; 'header:Received:8': 0.30; 'says': 0.33; 'zero': 0.33; 'to:addr :python-list': 0.33; 'next': 0.35; 'add': 0.36; 'but': 0.36; 'skip:m 40': 0.36; 'should': 0.36; 'charset:us-ascii': 0.36; 'does': 0.37; 'drop': 0.37; 'subject:: ': 0.38; 'skip:l 20': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'subject:-': 0.40; 'most': 0.61; 'first': 0.61; 'different': 0.63; 'information,': 0.63; 'url:email': 0.63; 'more': 0.63; 'legal': 0.65; 'subject': 0.66; 'purchase': 0.67; 'as:': 0.75; 'sale': 0.76; 'compare:': 0.84; 'received:169.254.8': 0.84; 'spell': 0.91 X-DKIM: OpenDKIM Filter v2.1.3 sf2.jpmchase.com q9IIgh6g020702 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpmorgan.com; s=smtpout; t=1350585764; bh=JbDOJqsxS90BkhHmrpTSFTaWXRkgRWZeW3C3g6iUArI=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=r20i31is8ZD7IG/Bg0dGb1Pci86FfItj/C5BWG3pI4N0x2EylHahH+DE+LeK8PbRp +Rlr3Tz5/cNlPd/eT8ORv7lgwGBG0qJtA9JV1yPPgba66GEw79VTt28jfGuSUt+CMl k7GT1qFoag/WKu3GyFuCO2tw09NyObNQOCsMI1ZM= From: "Prasad, Ramit" To: "python-list@python.org" Subject: RE: A desperate lunge for on-topic-ness Thread-Topic: A desperate lunge for on-topic-ness Thread-Index: AQHNrPpBNsmxNmolzk6qV+o8FxdNjZe/CPYAgABc4nA= Date: Thu, 18 Oct 2012 18:42:33 +0000 References: <507fa256$0$11093$c3e8da3@news.astraweb.com> <507fc6b4$0$6861$e4fe514c@news2.news.xs4all.nl> In-Reply-To: <507fc6b4$0$6861$e4fe514c@news2.news.xs4all.nl> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.67.79.47] Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-DLP-FWD: Yes Content-Type: text/plain; charset="us-ascii" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1350587624 news.xs4all.nl 6860 [2001:888:2000:d::a6]:46037 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31678 Hans Mulder wrote:=0D=0A> On 18/10/12 08:31:51, Steven D'Aprano wrote:=0D= =0A> > On Thu, 18 Oct 2012 02:06:19 -0400, Zero Piraeus wrote:=0D=0A> >> 3= =2E Say "well, at least it's not a backslash" and break the line using=0D= =0A> >> > parentheses=2E=0D=0A> > I mostly do this=2E Since most lines incl= ude a bracket of some sort, I=0D=0A> > rarely need to add outer parentheses= just for the purpose of line=0D=0A> > continuation=2E=0D=0A> >=0D=0A> > so= me_variable =3D spam('x') + ham(=0D=0A> > some_longer_v= ariables, here_and_here,=0D=0A> > and_here_also)=0D=0A>= =0D=0A> I would spell that as:=0D=0A> =0D=0A> some_variable =3D spam('x') = + ham(=0D=0A> some_longer_variables,=0D=0A> here_and_here,=0D=0A> = and_here_also,=0D=0A> )=0D=0A> =0D=0A> > I know PEP 8 says I should drop= the final round bracket to the next line,=0D=0A> > but I don't normally li= ke that=2E=0D=0A> =0D=0A> I normally put the final bracket on the next line= , where it is=0D=0A> very visible=2E Compare:=0D=0A> =0D=0A> if looks_like= _it_might_be_spam(=0D=0A> some_longer_variables,=0D=0A> here_and_he= re, and_here_also):=0D=0A> logger=2Enotice("might be spam")=0D=0A> = move_to_spam_folder(some_longer_variables)=0D=0A> update_spam_statistic= s(here_and_here)=0D=0A> =0D=0A> vs=2E=0D=0A> =0D=0A> if looks_like_it_might= _be_spam(=0D=0A> some_longer_variables,=0D=0A> here_and_here,=0D=0A= > and_here_also,=0D=0A> ):=0D=0A> logger=2Enotice("might be spam")= =0D=0A> move_to_spam_folder(some_longer_variables)=0D=0A> update_sp= am_statistics(here_and_here)=0D=0A> =0D=0A> Which one would you say is more= readable?=0D=0A> =0D=0A=0D=0AFor the first example, I would probably inden= t the arguments more =0D=0Ato differentiate a continuing line=2E That way t= he "):" does not=0D=0Alook like it was un-indented to be part of a differen= t block=2E=0D=0A=0D=0Aif looks_like_it_might_be_spam(=0D=0A some= _longer_variables,=0D=0A here_and_here, and_here_also):=0D=0A = logger=2Enotice("might be spam")=0D=0A move_to_spam_folder(some_longer_= variables)=0D=0A update_spam_statistics(here_and_here)=0D=0A=0D=0A=0D=0A= Ramit Prasad=0D=0A=0D=0A=0D=0A=0D=0AThis email is confidential and subject = to important disclaimers and=0D=0Aconditions including on offers for the pu= rchase or sale of=0D=0Asecurities, accuracy and completeness of information= , viruses,=0D=0Aconfidentiality, legal privilege, and legal entity disclaim= ers,=0D=0Aavailable at http://www=2Ejpmorgan=2Ecom/pages/disclosures/email= =2E