Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed3a.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; '16,': 0.03; 'subject:Python': 0.06; '(especially': 0.07; 'assign': 0.07; 'runs': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'creates': 0.14; '*only*': 0.16; 'braces': 0.16; 'dislike': 0.16; 'foul': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'optional.': 0.16; 'semicolon': 0.16; 'tends': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'code,': 0.22; 'rules': 0.22; 'cc:addr:python.org': 0.22; '(or': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'raise': 0.29; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'you?': 0.31; 'probably': 0.32; 'languages': 0.32; "i'd": 0.34; 'subject: (': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'subject:New': 0.37; 'sometimes': 0.38; 'pm,': 0.38; 'does': 0.39; "you're": 0.61; 'skip:n 10': 0.64; 'lack': 0.78; '2015': 0.84; 'ambiguous': 0.84; 'prefers': 0.84; 'increases': 0.91; 'whereas': 0.91; 'to:none': 0.92 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:cc :content-type; bh=fH0vbQ+bTTnQbSkS017U+xltegweHdyusGSxr1IpyKE=; b=PeBxnW6yJ8ETh/iDVQ+v4mpdU7dezJOJXnjJLYtfR4yjQc6lnGQIE50uU2gYTYLljO Y1NCJ1GiedG3aRNmJuaWB/ddKi18UqfEIFMm+ZBa5K8m1EsBOARVAw2Dhv5RVgNdsN4J zfKirVA6907BF79tOVNqmy3yTSrgmwnb+3Fy6aOwMhU2u/9ZhZEFTBOlNf35JhUBoKhM Rl1fBHNe56bKJGNXW7QVIQqhKt5i7PWtjuJQUy046/M95ljrBlTEY+ernrBWu6k7IvHh lU56tKMA2hIVgooKuYlcIdSAJyE2nyDcOgcddEd1Xy7SIFSrBxeDt9ES/Iz/rDlmuP0V Otkg== MIME-Version: 1.0 X-Received: by 10.50.43.197 with SMTP id y5mr5766124igl.14.1429192241126; Thu, 16 Apr 2015 06:50:41 -0700 (PDT) In-Reply-To: References: <9fc57fc9-0399-4ff3-882a-d041f02827d8@googlegroups.com> <552F772B.8030201@rece.vub.ac.be> <552f9264$0$11092$c3e8da3@news.astraweb.com> Date: Thu, 16 Apr 2015 23:50:41 +1000 Subject: Re: New to Python - block grouping (spaces)yhoni From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1429192249 news.xs4all.nl 2906 [2001:888:2000:d::a6]:46042 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:89025 On Thu, Apr 16, 2015 at 11:18 PM, alister wrote: > be warned you may find it creates (or increases ) an extreme dislike for > C & other languages that require braces & semicolons, it did for me > (especially the semi-colon!) I'd just like to add to this that the lack of semicolon in Python works well because, and *only* because, Python has a lot of other rules that also are newline-sensitive. ECMAScript code sometimes runs foul of the "oops I left off a semicolon and my program did something weird" problem, which Python code almost never will. (Partly that's because Python prefers to raise SyntaxError in ambiguous cases, whereas ECMAScript tends to assign meaning to them one way or another.) If you're writing ECMAScript code, you probably want to keep all the semis, but in Python, they don't help you at all. And yet they're both classed as optional. Does that seem right to you? :) ChrisA