Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.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.192 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.62; '*S*': 0.01; 'python.': 0.04; 'operator': 0.05; 'python': 0.08; 'question:': 0.09; 'am,': 0.12; 'impose': 0.16; 'parentheses': 0.16; 'unary': 0.16; 'syntax': 0.16; 'wrote:': 0.16; 'wed,': 0.17; 'discussion': 0.22; 'header :In-Reply-To:1': 0.22; 'to:name:python-list@python.org': 0.23; 'skip:( 30': 0.24; 'aug': 0.24; 'code': 0.25; 'expressions': 0.29; 'lines': 0.30; 'splitting': 0.30; 'yet': 0.32; 'closing': 0.32; 'error.': 0.32; 'to:addr:python-list': 0.33; 'read,': 0.36; 'statements': 0.37; 'languages': 0.37; 'but': 0.37; 'some': 0.38; 'easier': 0.38; 'skip:o 20': 0.38; 'subject:: ': 0.39; 'finished': 0.39; 'to:addr:python.org': 0.39; 'case': 0.39; 'might': 0.40; 'more': 0.60; 'received:98': 0.61; 'free': 0.63; 'received:98.138.90': 0.64; 'received:bullet.mail.ne1.yahoo.com': 0.64; 'received:98.138.91': 0.66; 'received:98.138': 0.67; 'received:mail.ne1.yahoo.com': 0.67; 'received:ne1.yahoo.com': 0.67; 'special': 0.67; 'note:': 0.68; 'legal': 0.70; 'reply- to:addr:yahoo.com': 0.70; 'header:Reply-To:1': 0.71; 'subject:line': 0.73; 'viewed': 0.82; '10:56': 0.84; 'received:98.138.90.57': 0.84; 'received:98.138.91.35': 0.84; 'received:nm28-vm1.bullet.mail.ne1.yahoo.com': 0.84; 'sommers': 0.84; 'received:98.138.88': 0.91 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 217436.65097.bm@omp1032.mail.ne1.yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1312981104; bh=qIT5oyGdBAPk25IzHgtOP4uIukosFPMXqmKovGngpJY=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=mReIMjaO2Rt9zAl0wfi0oYlnrfm1n2CZJCOrOhhzPwqAMrNg4zdvnkJLWKj4af6rAWXBQkKosfgO8uj6pJCL3mwW+vEz2BErBX3IhX3n3DJ0Ze8RZqu0CKagSTYoCopPbt1QsU4U/WAuhue53r5rkwxuHlhLkOH1DcJZuewnExg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=zCQKNUnAc7rvkZV6gjcEPqJ304hvx9XQfDABiFbm6jVLP/Fl97wgADcj8lyfkSxMQ6WNiag7G7oqBm9xmI6KsK65plArDf1/8GWVzHWxbbm5HOVlu+AEI84h4BQoRhHSoyKaZwDICsc1wgOc7K7RVrCq8CgnTKroAii6r7nzonY=; X-YMail-OSG: gIl7knoVM1mEWGLnWzV0e55FoBbERasCX4.hUr.X8L0Gew. JY3kg7nz5r1Lk.HTvFDGBXVSm81Xh3O0twhBr.WxAkDFE.rUycq4C0kydAPY pgO9Rj5hWHN0qrkuJlnplvyhVg2.6H6gT3vd5wQPUk3iZNy.OOWzf._LZYSG 4mf7xOKISoXUuIf2MvQErVPPSAyNqXjg.K1RuIcCiUceuZC1Y0YA0ocSsNH1 1k4tT6alB1ZoB4N66OFP8ZCEfICAm_sXNEfP714NHc58ZNQfkeAuTfBixCxI Fo_WguQRUQeeZfL6UcWjaneg_QI9KKQnVJrdTQjfvt6dD3SJ6Yr0VRLbCaOX DaXb21q5ar5Br32sDvOi10Z0wuAkm3FZNHni01cp8CxYIqP0rhsBgxetW0sn 0OrHkfthbOjv7sQdUHGn7N3.KTENrt6NwvYco31TRSg-- X-Mailer: YahooMailWebService/0.8.113.313619 References: <1312951356.77394.YahooMailNeo@web121518.mail.ne1.yahoo.com> <4e424208$0$29965$c3e8da3$5496439d@news.astraweb.com> Date: Wed, 10 Aug 2011 05:58:24 -0700 (PDT) From: Yingjie Lan Subject: Re: allow line break at operators To: "python-list@python.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Yingjie Lan 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1312981107 news.xs4all.nl 23838 [2001:888:2000:d::a6]:41428 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11117 > On Wed, Aug 10, 2011 at 10:56 AM, Dan Sommers =0A= =0A> wrote: =0A>> In terms of easier to read, I find code easier to read wh= en the=0A>> operators are at the beginnings of the lines (PEP 8 notwithstan= ding):=0A>>=0A>> =A0 =A0x =3D (someobject.somemethod(object3, thing)=0A>> = =A0 =A0 =A0 =A0 + longfunctionname(object2)=0A>> =A0 =A0 =A0 =A0 + otherfun= ction(value1, value2, value3))=0A>>=0A> =0A> Without the parentheses, this = is legal but (probably) useless; it=0A> applies the unary + operator to the= return value of those functions.=0A=0A:No, in some other languages it migh= t be legal, but this is Python.=0A:without the parentheses it is a syntax e= rror.=0A=0AThis discussion leads me to this question:=0A=0AIs it possible f= or python to allow free splitting of single-line statements=0Awithout the b= ackslashes, if we impose that expressions can only be split=0Awhen it is no= t yet a finished expression? Note: splitting before closing =0Aparenthis, b= race, or bracket can be viewed as special case of this =0Amore general rule= .=0A=0A=0AYingjie=0A