Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.kpn.net!pfeed08.wxs.nl!newsfeed.xs4all.nl!newsfeed6.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.110 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.82; '*S*': 0.04; 'example:': 0.03; 'lines.': 0.05; 'operator': 0.05; 'currently,': 0.07; 'operator,': 0.09; 'thoughts?': 0.09; 'to:name:python list': 0.09; 'skip:f 30': 0.13; '#the': 0.16; 'included,': 0.16; 'all,': 0.28; 'looks': 0.29; 'expression': 0.32; 'break': 0.32; 'usually': 0.32; 'to:addr :python-list': 0.33; 'wondering': 0.33; 'clearly': 0.34; 'but': 0.37; 'why': 0.39; 'to:addr:python.org': 0.39; 'received:98': 0.61; 'received:98.138.90': 0.64; 'received:bullet.mail.ne1.yahoo.com': 0.64; 'here': 0.65; 'received:98.138.91': 0.66; 'received:98.138': 0.67; 'received:mail.ne1.yahoo.com': 0.67; 'received:ne1.yahoo.com': 0.67; 'reply-to:addr:yahoo.com': 0.70; 'header:Reply-To:1': 0.71; 'subject:line': 0.73; 'received:98.138.90.57': 0.84; 'received:98.138.91.35': 0.84; 'received:nm28-vm1.bullet.mail.ne1.yahoo.com': 0.84; 'thing).': 0.84; '\xa0\xa0\xa0\xa0\xa0': 0.84 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 456069.93136.bm@omp1019.mail.ne1.yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1312951356; bh=9e1AQDoHFU5VB2Fmb1+prvpat087JbEKWuXPCCE8dvw=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=nfHLKoFg9IHGxaKyHOm/cChYztV3slELbu16PLeNJDrjoaEe7NUHAK+IXuATyCH9SM8KmipJClek+fRCVmOtFomzkAtAOSQtYZGcVQAJ81pNmF3SCyrpF1euCLx9w831Q5XtwlSWkL5FfcOKrO9Ijal1xvfbggnmvS327tK8L6c= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bXaMzNWj0juc+8SPqUh1idq8gkagimk6XZEg5pS/x6saLDMR1QLFxhBTAEisGpljQVDNoWVdwb+I0evJ1+29CZLUYcmFhm2DcV1NHqyg/wyDOn3Gm1g4HHdCuJH3ltEMwPQXelywxs/1TrBMA+OYz513GfmnH8yIFjVoNQPujMA=; X-YMail-OSG: 1XfdyOkVM1nyFOacKaTDuzwA12gyiYwDPi0EMmY.G.elSXU UtwmDi61z6byrTVHlWsDuSPf70sCQgQhTZ23T1slFY5Dryuk8OtH3WWekJ_E VxBctqy0bVJh_qU81Tekc4u2_hLmJGjROMh1Dbn7vRsfKoNyvShrzDeCkvVZ NkwwgSKEmP1xhEW7jgC8RAFFhsSLPa6C3LL9s6b4L7CW_slTlX1mfy.EWHMf N9nj8FKe_e1gAAXIVK4XY.VsdEy0zLBH25j5wInCqL4vUnfsD7FhuSo_Ytiy oPRcawPehJMoxZJreL4lj5BE2h.62g.KP_nFnsPxAoZ80_gxlzQoJoL6W6iV QIUSBxD8TKKSTlcFXS0mL4d4_WLXiKZQ4o_Jc0neQsb3HdncM0NmHQyJe_G3 xaN4V0QwskPaVIe9NEJLKyXKrjz6rrcAqZU4J1Ixyaw-- X-Mailer: YahooMailWebService/0.8.113.313619 Date: Tue, 9 Aug 2011 21:42:36 -0700 (PDT) From: Yingjie Lan Subject: allow line break at operators To: python list 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1312951551 news.xs4all.nl 23838 [2001:888:2000:d::a6]:45717 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11092 Hi all,=0A=0AWhen writing a long expresion, one usually would like to break= it into multiple lines. Currently, you may use a '\' to do so, but it look= s a little awkward (more like machine-oriented thing). Therefore I start wo= ndering why not allow line breaking at an operator, which is the standard w= ay of breaking a long expression in publication? Here is an example:=0A=0A#= the old way=0A=0Ax =3D 1+2+3+4+\=0A=A0=A0=A0=A0=A0 1+2+3+4=0A=0A#the new wa= y=0Ax =3D 1+2+3+4+ #line continues as it is clearly unfinished=0A=0A=A0=A0= =A0=A0=A0 1+2+3+4=0A=0AOf course, the dot operator is also included, which = may facilitate method chaining:=0A=0Ax =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=0AThoughts?=0A=0AYingjie=0A