Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.013 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.01; 'subject:error': 0.03; 'operator': 0.03; 'languages.': 0.04; 'subject:while': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'precedence': 0.16; 'roy': 0.16; 'subject:program': 0.16; 'ternary': 0.16; 'wrongly': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'mon,': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'received:google.com': 0.35; 'being': 0.38; 'ahead': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'aside': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'covers': 0.68; 'smith': 0.68; 'subject:First': 0.74; 'everything.': 0.84; 'hand,': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=DcxfqOMOf4p8AYJftOfbDKVOyqa3V3hmnVylFAlGjOQ=; b=yCHyzO9A12VQA/fpDedTAx3lCAfjCzHQhVZsmRDPV0g5C6mZIDJ+SAYwcqOP5nhC3B E+457u1b2W9qrkZb2zWDM8YHddVZ+Tl75pUyzDPVZ345HbJd9g9+EPnGE4cd3fyJDF1F hnPq4qcknh2dRcKigy72HFPNS8s75lbTKu/Noxd034xVRD4bO+W7YwxlUHGqTTQ7aGkE NYCF42EHxDEJTYNU8JwCJq1Tt8OTFUQZGHji1cIfPvIClZrWjOeY+7YkIKCaBH4uKCNf peF9jo0lfRQ07xKVcL10K0ogFJX4ubZQPEbwig9wKyZQ2w9zQfxhj8d3/CZatgRzCisP ykVg== MIME-Version: 1.0 X-Received: by 10.52.122.109 with SMTP id lr13mr4797878vdb.91.1367847476585; Mon, 06 May 2013 06:37:56 -0700 (PDT) In-Reply-To: References: <24c5856e-a30a-41bd-aa4a-0e594734e1f8@googlegroups.com> <163bd508-f225-4b4d-8173-1e070c5d5aad@googlegroups.com> Date: Mon, 6 May 2013 23:37:56 +1000 Subject: Re: First python program, syntax error in while loop 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.15 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367847484 news.xs4all.nl 15998 [2001:888:2000:d::a6]:55267 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44830 On Mon, May 6, 2013 at 11:08 PM, Roy Smith wrote: > On the other hand, I've long since given up trying to remember operator > precedence in various languages. If I ever have even the slightest > doubt, I just go ahead and put in the extra parens. If I ever have even the slightest doubt, I just go ahead and type " operator precedence" into a web search and check it :) Aside from utter insanity like PHP's ternary operator being wrongly associative, that covers pretty much everything. ChrisA