Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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; 'operator': 0.03; 'remind': 0.05; 'modulo': 0.09; 'whichever': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'assume': 0.14; '1:08': 0.16; 'backward': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'precedence': 0.16; 'roy': 0.16; 'language': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'cc:addr:python.org': 0.22; '31,': 0.24; 'integer': 0.24; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'usually': 0.31; 'concern.': 0.31; 'division': 0.31; 'operators': 0.31; 'fri,': 0.33; 'table': 0.34; 'received:google.com': 0.35; 'that,': 0.38; 'anything': 0.39; 'up,': 0.60; 'today.': 0.61; 'full': 0.61; "you're": 0.61; 'smith': 0.68; 'everything.': 0.84; 'or:': 0.84; 'subject:True': 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=9wwIcZW300RxcudcHSAzXfC5Q5dFIB6N0QuTw/jtMlw=; b=msYxOuZ5gSUir38eLrE2avAjmfmbFEra+gq9n8z8BNrX9QcUiqx5Lt1baRsaIMWk28 Vb1dq3qiiPNKIciCIzIZt/SkTZHpXD9qlICx02ME7wmaA64NhdL3H8fqTxm4pdHyJRo+ Rz+ZSRMv4f5B6PW3EqNUwvhpdXmoph0AquRFmVILyo5ZEedBxmyd+YIfakbFHjmCWbLx EYNv8ZKtJEbsSq4qZHgTkRCsAI7bbQJKzOX7Dcuq+f5cbJ2htvWIhuik9fIlSnZdH1B4 vI4SYRmfrPQbk1h7OjzIh8b2E7VmjZFpHAuG6U3oCiTkCIg6m1/Hok6/D3doa1ByE90M 4IMw== MIME-Version: 1.0 X-Received: by 10.68.162.66 with SMTP id xy2mr14696618pbb.46.1391091509179; Thu, 30 Jan 2014 06:18:29 -0800 (PST) In-Reply-To: References: <99b0aa22-5fb3-460a-a080-dacb1c0f2fda@googlegroups.com> <3dcdc95d-5e30-46d3-b558-afedf9723c7c@googlegroups.com> Date: Fri, 31 Jan 2014 01:18:29 +1100 Subject: Re: 1 > 0 == True -> False 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.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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391091519 news.xs4all.nl 2868 [2001:888:2000:d::a6]:50297 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65009 On Fri, Jan 31, 2014 at 1:08 AM, Roy Smith wrote: > Better than that, do what I do. > > 1) Assume that you don't have the full operator precedence table > memorized and just parenthesize everything. Or: 1a) Assume that you don't have the full operator precedence table memorized and just look it up, for whichever language you're working with today. :) Usually the precedence table will also remind me of operator chaining, and whether the integer division and modulo operators are backward (compare REXX and Python with their % and // operators), and anything else that needs concern. ChrisA