Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; '(at': 0.03; 'example:': 0.03; 'subject:Python': 0.06; 'compiler': 0.07; 'ugly': 0.07; 'matt': 0.09; 'plus,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'subject:] ': 0.14; 'heavily': 0.15; 'bieber': 0.16; 'declaimed': 0.16; 'email addr:ix.netcom.com': 0.16; 'email name:wlfraed': 0.16; 'from:addr:ix.netcom.com': 0.16; 'from:addr:wlfraed': 0.16; 'from:name:dennis lee bieber': 0.16; 'indent': 0.16; 'lan': 0.16; 'parsed': 0.16; 'received:66.245': 0.16; 'received:dsl.mindspring.com': 0.16; 'received:mindspring.com': 0.16; 'received:wlfraed': 0.16; 'syntactical': 0.16; 'url:netcom': 0.16; 'url:wlfraed': 0.16; 'workaround': 0.16; 'wulfraed': 0.16; 'sfxlen:2': 0.19; 'cc:no real name:2**0': 0.20; 'compatible': 0.21; 'url:home': 0.21; "doesn't": 0.22; 'cc:2**0': 0.22; '-0700': 0.23; 'breaks': 0.23; 'indentation': 0.23; 'sep': 0.23; 'starts': 0.24; 'matching': 0.24; 'says': 0.25; 'code,': 0.28; 'lee': 0.28; 'thu,': 0.28; 'explicitly': 0.29; 'cc:addr:python.org': 0.30; 'expression': 0.32; 'break': 0.32; 'closing': 0.32; 'source': 0.33; "can't": 0.33; 'to:addr:python-list': 0.33; 'things': 0.34; 'here,': 0.35; 'header:X-Complaints-To:1': 0.35; 'another': 0.37; '8bit%:6': 0.37; 'but': 0.37; 'open': 0.37; 'from:': 0.38; 'received:org': 0.38; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'your': 0.61; 'below': 0.62; 'skip:= 50': 0.63; 'free': 0.63; 'increase': 0.63; 'here': 0.65; 'proposal': 0.67; 'subject:line': 0.73; 'dennis': 0.77; 'freely': 0.84; 'joiner': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: [Python-ideas] allow line break at operators Date: Thu, 01 Sep 2011 22:19:20 -0700 Organization: > Bestiaria Support Staff < References: <1312982377.95657.YahooMailNeo@web121508.mail.ne1.yahoo.com> <1313031175.38817.YahooMailNeo@web121515.mail.ne1.yahoo.com> <4E43D2F2.1090004@mrabarnett.plus.com> <1314884634.78252.YahooMailNeo@web121507.mail.ne1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: user-11fb66t.dsl.mindspring.com X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES Cc: python-ideas@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 73 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1314940809 news.xs4all.nl 2512 [2001:888:2000:d::a6]:38242 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12615 On Thu, 1 Sep 2011 06:43:54 -0700 (PDT), Yingjie Lan declaimed the following in gmane.comp.python.general: > Hi Matt, > > ======================================================= > From: Matt Joiner > > > The "trailing \" workaround is nonobvious. Wrapping in () is noisy and > already heavily used by other syntactical structures.  > > ======================================================= > > How about only require indentation > to freely break lines? Here is an example: > > x = firstpart * secondpart #line breaks here > + anotherpart #continue by indentation > + stillanother #continue on. > #until here, another line starts by dedentation  > y = some_expression - another_one > > All this would be completely compatible with former code, while > having almost free line breaking! Plus, indentation makes it pretty. > But it really complicates the parsing... An open ( explicitly informs that this expression will continue until a matching closing ) is reached. Your proposal says that the compiler can't close an expression until it has parsed the next line (at minimum). And it would mean such ugly things as if x - 6 > y + 8 : doThis() in which the : doesn't require the next line to be indented deeper than the line it is on OR you end up having to remember that any : needs a deeper indent below if x - 6 > y + 8 : doThis() Whereas if (x - 6 > y + 8) : doThis() is invalid, and if (x - 6 > y + 8): doThis() is treated AS-IF the source were the unwrapped if (x - 6 > y + 8): doThis() Only one increase in level of indentation following the : -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/