Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'example:': 0.03; 'lines.': 0.05; 'operator': 0.05; 'currently,': 0.07; 'dislike': 0.07; 'operator,': 0.09; 'skip:f 30': 0.13; '#the': 0.16; 'cc:name:python list': 0.16; 'included,': 0.16; 'lan': 0.16; 'parentheses': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.16; 'cheers,': 0.18; 'cc:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'tue,': 0.23; 'pair': 0.23; 'pm,': 0.24; 'aug': 0.24; 'function': 0.27; 'all,': 0.28; 'looks': 0.29; 'cc:addr:python.org': 0.30; 'expression': 0.32; 'break': 0.32; 'does': 0.32; 'usually': 0.32; 'wondering': 0.33; 'force': 0.34; 'things': 0.34; 'clearly': 0.34; 'doing': 0.36; 'but': 0.37; 'think': 0.38; 'subject:: ': 0.39; 'ways': 0.39; 'why': 0.39; 'received:98': 0.61; 'received:98.138.90': 0.64; 'received:bullet.mail.ne1.yahoo.com': 0.64; 'here': 0.65; 'natural': 0.65; 'received:98.138.91': 0.66; 'taking': 0.66; 'received:98.138': 0.67; 'received:mail.ne1.yahoo.com': 0.67; 'received:ne1.yahoo.com': 0.67; 'works,': 0.68; 'reply-to:addr:yahoo.com': 0.70; 'header :Reply-To:1': 0.71; 'subject:line': 0.73; 'thing).': 0.84; '\xa0\xa0\xa0\xa0\xa0': 0.84 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 565387.88222.bm@omp1026.mail.ne1.yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1312956356; bh=dX7O+Tlf1K7iygrZ1aFZblaxX0zUl3newrwuF9gX4PA=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=jhdv3Ejmj8dP9dMNaI/yziJ6gRIF/Uy3fqU+stsyOM2WS/Xnf6cmq0Yw4OKRLa5WzkJEnMW9ZzJGIngRyIv59Tpg0kh0Q0/KIHd8Rrfvej/9Ucir8q6TmjQLlUCWkqCv7SWuj3N1EyvHvXF36y+TCM3kblAILVU3yp7HPdXvquw= 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:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=4eQ11X6wGjJRALOeSoe7RUgQxkBpXvs6dsYt7Q5E1EiySnP4LDrXo5ZoCL74iWniroxkdKoOVFdvSDY5VKWOc8klScgHRdDQOK5Z1DNW2iL0ssl49OL4+FnOZ+MOCUmYyxcjFsFUgN66C1DLWGPA/rMUn9EEsQBtjs0JE7xpwnk=; X-YMail-OSG: EZm3sJAVM1lH_6_zKWsLuzvUr1pj1p0_1HlpYywOVDpoiBT P5H80co_H3s77uXaSFWACEY9bKx6NkW7GBysNRQMcjKAY_P.j1Vw0ivguzUi 1Vgz.YhhP.UxLLXGBYvtydjxjbcCq9.gLTDITYuwsaJBIK85Ta6cSTuyf0b4 lK9V0GeLlWF21lBvjo2CEz32mALqB8ZXlid_SJlDh07hEY_6Csiy3FwcFGDc qlp8pnhboE7exdg7QDS9gz20qlCXlZpllPM33uQEd9qCr7ExzqxkDXg.t8PM klRT3yL0epe49lEvrJCCS9swy1ks6EJRtwOTFAkjVWC8Oa4hWCjf0Z13GRmX PK7HsyC1oeturZ4kTN4P9No.clhchwguUKRBn_qTlIe52hkbndXd.bQqRjEn VY.wQ17FRzc853ATc1Fqbi4J0QSuSIji4aT.fPrI_LQ-- X-Mailer: YahooMailWebService/0.8.113.313619 References: <1312951356.77394.YahooMailNeo@web121518.mail.ne1.yahoo.com> Date: Tue, 9 Aug 2011 23:05:56 -0700 (PDT) From: Yingjie Lan Subject: Re: allow line break at operators To: Chris Rebert In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python list 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1312956463 news.xs4all.nl 23950 [2001:888:2000:d::a6]:56307 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11094 On Tue, Aug 9, 2011 at 9:42 PM, Yingjie Lan wrote:=0A= =0A> Hi all,=0A>=0A> When writing a long expresion, one usually would like = to break it into multiple lines. Currently, you may use a '\' to do so, but= it looks a little awkward (more like machine-oriented thing). Therefore I = start wondering why not allow line breaking at an operator, which is the st= andard way of breaking a long expression in publication? Here is an example= :=0A>=0A> #the old way=0A>=0A> x =3D 1+2+3+4+\=0A> =A0=A0=A0=A0=A0 1+2+3+4= =0A>=0A> #the new way=0A> x =3D 1+2+3+4+ #line continues as it is clearly u= nfinished=0A>=0A> =A0=A0=A0=A0=A0 1+2+3+4=0A=0A:# the currently allowed way= =0A:x =3D (1+2+3+4+=0A:=A0 =A0 1+2+3+4)=0A:# note the parentheses=0A:=0A:I = think this is sufficient.=0A=0AThat works, but not in the most natural way-= -the way people are customed to...why require a pair of parenthis when we c= an do without them? Also, the new way does not affect the old ways of doing= things at all, it is fully backward compatible. So this just offers a new = choice.=0A=0A> Of course, the dot operator is also included, which may faci= litate method chaining:=0A>=0A> x =3D svg.append( 'circle' ).=0A> =A0=A0=A0= =A0=A0 r(2).cx(1).xy(1).=0A> =A0=A0=A0=A0=A0 foreground('black').bkground('= white')=0A=0A:Also, I dislike this for the dot operator especially, as it c= an=0A:obscure whether a method call or a function call is taking place.=0A= =0AAgain, this only offers a new choice, and does not force anybody to do i= t this way.=0A=0Acheers,=0A=0AYingjie