Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!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; 'languages,': 0.03; 'escape': 0.04; 'projects,': 0.05; 'subject:Python': 0.06; 'received:verizon.net': 0.07; 'terry': 0.07; 'python': 0.08; 'instance.': 0.09; 'newline,': 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; 'welcomed': 0.09; 'am,': 0.12; 'subject:] ': 0.14; 'heavily': 0.15; '*after*': 0.16; '3:51': 0.16; 'duty.': 0.16; 'lan': 0.16; 'options)': 0.16; 'reedy': 0.16; 'unescaped': 0.16; 'what?': 0.16; 'wrote:': 0.16; 'language': 0.17; 'reason,': 0.18; 'jan': 0.19; 'sfxlen:2': 0.19; 'cc:no real name:2**0': 0.20; 'mechanism': 0.21; 'cc:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'fundamental': 0.23; 'indentation': 0.23; "python's": 0.24; 'code': 0.25; 'statement': 0.25; 'cc:addr:python.org': 0.30; 'lines': 0.30; 'terminate': 0.30; 'used,': 0.32; 'generally': 0.32; 'agree': 0.33; 'there': 0.33; 'to:addr:python-list': 0.33; 'header:User-Agent:1': 0.34; 'visible': 0.34; 'header:X-Complaints-To:1': 0.35; 'uses': 0.35; '(with': 0.35; 'beginning': 0.36; 'doing': 0.36; 'statements': 0.37; 'using': 0.37; 'two': 0.37; 'received:org': 0.38; 'some': 0.38; 'ways': 0.39; 'header:Mime-Version:1': 0.39; 'either': 0.39; 'goes': 0.39; 'to:addr:python.org': 0.39; 'case': 0.39; 'might': 0.40; 'your': 0.61; 'double': 0.61; 'human': 0.63; 'free': 0.63; 'subject:line': 0.73; 'claim': 0.76; 'blocks.': 0.84; 'readers.': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: [Python-ideas] allow line break at operators Date: Sat, 03 Sep 2011 15:01:31 -0400 References: <1312951356.77394.YahooMailNeo@web121518.mail.ne1.yahoo.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> <4E43D2F2.1090004@mrabarnett.plus.com> <1314884634.78252.YahooMailNeo@web121507.mail.ne1.yahoo.com> <877h5rjtdb.fsf@uwakimon.sk.tsukuba.ac.jp> <1315023501.31777.YahooMailNeo@web121514.mail.ne1.yahoo.com> <87aaamjgvh.fsf@uwakimon.sk.tsukuba.ac.jp> <1315036271.77996.YahooMailNeo@web121504.mail.ne1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-74-109-121-73.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 In-Reply-To: <1315036271.77996.YahooMailNeo@web121504.mail.ne1.yahoo.com> 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: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1315076551 news.xs4all.nl 2474 [2001:888:2000:d::a6]:57466 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12716 On 9/3/2011 3:51 AM, Yingjie Lan wrote: > I agree that long lines of code are not very common in many projects, > though it might be the case with some heavily involved in math. For some > reason, when the feature of free line breaking came about in computer > languages, it is welcomed and generally well accepted. Every language with blocks needs some mechanism to indicate the beginning and ending of blocks and of statements within blocks. If visible fences ('begin/end' or '{}') and statement terminators (';') are used, then '\n' can be treated as merely a space, as it is in C, for instance. > Python uses indentation for blocks, and it uses unescaped '\n' (with two escapement options) to terminate statements. This is fundamental to Python's design and goes along with significant indents. > and by the same mechanism, line breaking can be > accommodated without requiring parenthesis or ending backslashes. You need proof for your claim that indentation can be used for both jobs in the form of a grammar that works with Python's parser. I am dubious that you can do that with an indents *after* the newline. Even if you could, it would be confusing for human readers. There would then be three ways to escape newline, with one doing double duty. And for what? Merely to avoid using either of the two methods already available. -- Terry Jan Reedy