Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.mixmin.net!feeder.erje.net!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; 'python,': 0.01; ':-)': 0.06; 'python': 0.08; 'accidental': 0.09; 'clearly,': 0.09; 'from:addr:python': 0.09; 'imho.': 0.09; 'readable': 0.09; 'syntax.': 0.09; 'case.': 0.15; "';'": 0.16; 'downside,': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'lan': 0.16; 'magnitude.': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'optimizing': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'reply-to:addr:python-list': 0.16; 'semicolon': 0.16; 'semicolons': 0.16; 'sizable': 0.16; 'syntax': 0.16; 'wrote:': 0.16; "wouldn't": 0.17; 'wed,': 0.17; 'programming': 0.20; "we'd": 0.21; 'header:In-Reply-To:1': 0.22; '(or': 0.23; 'indentation': 0.23; 'optional': 0.23; 'pm,': 0.24; 'changed': 0.24; 'aug': 0.24; "python's": 0.24; "i'm": 0.27; 'received:84': 0.28; 'lines': 0.30; 'chris': 0.32; 'coding': 0.32; 'source': 0.33; 'to:addr:python-list': 0.33; 'header:User- Agent:1': 0.34; 'majority': 0.34; 'languages.': 0.34; 'reply- to:addr:python.org': 0.34; 'core': 0.36; 'but': 0.37; 'think': 0.38; 'should': 0.38; 'subject:: ': 0.39; 'to:addr:python.org': 0.39; 'case': 0.39; 'more': 0.60; 'free': 0.63; 'noise': 0.67; 'glad': 0.70; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.71; 'subject:line': 0.73; 'gain': 0.74; 'omission': 0.84 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnEMAC3SQ07Unw4S/2dsb2JhbABBmAw1jwV3gUABAQU4NAoCEQsIEAkWDwkDAgECAQ0mEhMGAgEBh228a4ZHBItdjDyEaIZ9 Date: Thu, 11 Aug 2011 14:03:22 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: allow line break at operators References: <1312951356.77394.YahooMailNeo@web121518.mail.ne1.yahoo.com> <4e424208$0$29965$c3e8da3$5496439d@news.astraweb.com> <1312981104.89312.YahooMailNeo@web121520.mail.ne1.yahoo.com> <1312982377.95657.YahooMailNeo@web121508.mail.ne1.yahoo.com> <1313031175.38817.YahooMailNeo@web121515.mail.ne1.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: python-list@python.org 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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1313067800 news.xs4all.nl 23863 [2001:888:2000:d::a6]:57197 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11212 On 11/08/2011 05:16, Chris Rebert wrote: > On Wed, Aug 10, 2011 at 7:52 PM, Yingjie Lan wrote: >> :And if we require {} then truly free indentation should be OK too! But >> >> :it wouldn't be Python any more. >> >> Of course, but not the case with ';'. Currently ';' is optional in Python, > > I think of it more as that Python deigns to permit semicolons. > >> But '{' is used for dicts. Clearly, ';' and '{' are different in magnitude. >> >> So the decision is: shall we change ';' from optional to mandatory >> to allow free line splitting? > > Hell no, considering that the sizable majority of lines *aren't* > split, which makes those semicolons completely redundant to their > accompanying newlines. We'd be practicing poor Huffman coding by > optimizing for the *un*common case. It would also add punctuational > noise to what is otherwise an amazingly clean and readable syntax. > Accidental semicolon omission is (IMO) the most irritating source of > syntax (and, inadvertently, sometimes other more serious) errors in > curly-braced programming languages. > +1 > Such a core syntax feature is not going to be changed lightly (or likely ever). > I'm glad to hear that. :-) Although Python's use of indentation has its downside, we gain much more then we lose, IMHO.