Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python,': 0.01; '(although': 0.05; 'subject:Python': 0.05; 'parsing': 0.09; 'rule.': 0.09; 'sure,': 0.09; 'am,': 0.12; '16,': 0.15; 'case.': 0.15; 'backslash,': 0.16; 'colons,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'indent': 0.16; 'wrote:': 0.18; 'received:209.85.210.174': 0.21; 'received:mail- iy0-f174.google.com': 0.21; "doesn't": 0.22; 'header:In-Reply- To:1': 0.22; 'figure': 0.26; 'helpful': 0.26; 'not.': 0.28; '(this': 0.28; 'sound': 0.28; 'message-id:@mail.gmail.com': 0.29; 'colon': 0.30; 'quite': 0.31; 'break': 0.32; 'there': 0.33; 'fri,': 0.34; 'to:addr:python-list': 0.35; 'something': 0.35; 'but': 0.37; 'received:google.com': 0.37; 'skip:" 10': 0.37; 'received:209.85': 0.38; 'open': 0.38; 'received:209': 0.39; 'put': 0.40; 'to:addr:python.org': 0.40; 'more': 0.61; 'simple': 0.61; 'your': 0.61; 'helps': 0.63; 'further': 0.64; 'press': 0.69; 'elaborate': 0.84; 'spaces.': 0.84; 'involved.': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=CiEUJzonjn+d6pXtFVVYN7IGHPrxWBuirbEF7iSQhk8=; b=lSHbrzVLc/fyzxf94cs5ySLV4GypQwXWaUBjOoduPtAN3IR7iwJX659wU9eOREznm9 AwEddnI1ZBFkij9OFyLO75RKgyJf+I+g5UYcat8882q1Q3AJX39s3eCBDAhlOvfBtgja qrvDJ6pVS3e4o41lsSFBWj88XPUtyk9xraKpsaCTw7lYtufiNOFSXXcjJ0bYDt8RFnSI N2N0Y4f8e+s1QFZcXvMkIoTDWTD5FTzvKf0eORNEEis2R8PacBjw/accMyO3AL8YqG6F 2PshGHKQdXJbeX+Ue7RzQ4VLVlUhiLuOtKOnTGCef55L3B9Y31y5LgYcvHctEWjhppOe BhYg== MIME-Version: 1.0 In-Reply-To: <4f6202cb$0$1377$4fafbaef@reader2.news.tin.it> References: <4f612b19$0$1379$4fafbaef@reader2.news.tin.it> <8e72d74f-c844-4de3-8a37-f6b1fdc2291f@y27g2000yqy.googlegroups.com> <50e9ceec-40f1-4ead-b2b6-87328b30d084@ow8g2000pbc.googlegroups.com> <4f61c828$0$1390$4fafbaef@reader2.news.tin.it> <4f61d728$0$1375$4fafbaef@reader2.news.tin.it> <4f61fa8a$0$1381$4fafbaef@reader2.news.tin.it> <4f6202cb$0$1377$4fafbaef@reader2.news.tin.it> Date: Fri, 16 Mar 2012 02:08:37 +1100 Subject: Re: Python is readable From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331824120 news.xs4all.nl 6870 [2001:888:2000:d::a6]:58779 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21683 On Fri, Mar 16, 2012 at 1:55 AM, Kiuhnm wrote: > By the way, the more elaborate parsing consists of looking for an > END_OF_LINE followed by one or more spaces. It doesn't sound that > complicated. Only in the trivial case. What if you want to break your condition over multiple lines? (Although you have to parenthesize or backslash, so that's still unambig.) It's helpful to be explicit. > And what about an editor which indent when you press the spacebar or tab? Sure, but a good editor helps out by noticing that you did something that begs for indentation. If I put an open brace, SciTE will indent - very simple rule. With Python, if there were no colon markers, it would be quite complicated to figure out whether or not to indent; with the colons, it's simply "if/while/etc" followed by text followed by colon, and then no further non-comment text. (This sounds involved. It's not. It's right enough. -- Lady Blanche) ChrisA