Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.08; 'bash': 0.09; 'newline': 0.09; 'optional.': 0.09; 'am,': 0.12; '16,': 0.15; 'complicated,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'received:209.85.210.174': 0.21; 'received:mail- iy0-f174.google.com': 0.21; 'header:In-Reply-To:1': 0.22; 'statement': 0.23; 'referring': 0.23; 'message- id:@mail.gmail.com': 0.29; 'condition.': 0.29; 'explicitly': 0.29; 'sorry,': 0.29; 'humans': 0.30; 'if,': 0.30; 'does': 0.32; 'actual': 0.32; 'there': 0.33; "can't": 0.33; 'fri,': 0.34; 'mostly': 0.34; 'to?': 0.34; 'to:addr:python-list': 0.35; 'example,': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'using': 0.37; 'received:209.85': 0.38; 'allows': 0.38; 'received:209': 0.39; 'put': 0.40; 'to:addr:python.org': 0.40; 'more': 0.61; 'body': 0.61; 'simple': 0.61; 'your': 0.61; 'harder': 0.64 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=A6dbLqYItnXy6fSjvMg1icdABR6nlG2VpoPvkucnT6U=; b=KvGv/dFvu19NdMvvTgh/LRccpWRM3AhOi8VkYK3PgouL4CPKnav9UUW65HwFup9cAV 7KFYB71Cn/oZVTa3FRhotT63ZoVDW+Y1DsHpVhZR8NdqSIvTdVztq6JfdsTBBSKaDlEA ARwE30/5gyk/fGcMm7H6L+8R2tlps4T/6mi+M6CSuVyB+fe9Xs8GfK7xR4hSVlQQanr/ CVOSBQkIsKdiCZweMUUXAw/GNkT72jeGV1P5KHkgTK+O2XaZTHInF1A+Cooo1E6a4f8G XimLorszQcSqPEF+OEltenJUiaOQ9nq4pCc4n4nflkshDbal6fAGCHmThhh+2NbsRyJc umVw== MIME-Version: 1.0 In-Reply-To: <4f61fd0a$0$1389$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> <4f61fd0a$0$1389$4fafbaef@reader2.news.tin.it> Date: Fri, 16 Mar 2012 01:48:09 +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: 1331822892 news.xs4all.nl 6943 [2001:888:2000:d::a6]:47564 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21680 On Fri, Mar 16, 2012 at 1:30 AM, Kiuhnm wrote: > Sorry, but I can't see how it would make it harder for humans to understand. > Are there particular situations you're referring to? In a trivial example, it's mostly just noise: if a == b # who needs the colon? print(c) But when your condition is more complicated, it's cleaner to explicitly mark the end of the condition. Also, Python allows you to put a simple body on the same line as the if, which is very handy: if a == b: print(c) Without the colon, this would be awkward to parse. And the bash style of using actual statement separators feels really weird, although it does mean that the newline is truly optional. ChrisA