Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.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.077 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.00; 'see.': 0.07; 'subject:code': 0.07; 'consistency.': 0.09; '153': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.17; 'received:209.85.214.174': 0.21; 'seems': 0.23; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message- id:@mail.gmail.com': 0.27; 'johnson': 0.32; 'to:addr:python-list': 0.33; 'equal': 0.33; 'received:google.com': 0.34; 'consistent': 0.35; 'received:209.85': 0.35; 'should': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'page': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'most': 0.61; 'evaluate': 0.62; 'jul': 0.65; 'absolutely': 0.84; 'edition': 0.86; 'rick': 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=o56sQYC5CTIihEqwWRaUxAqsMf+AKBcb5lMTWf5cA2g=; b=yec8RmLW9Q8Cl/Hh29YtPQWGNDTyWMsQoq3NPVHls5hmKPp2uZ6MudGLMW4qZWqAg9 5QU5ydrYbMfWJ/6v5xAYkUZiWRha2UhG+aO2nCGOAtFmMQKGx894Ed6owgMrluAGHzTA kArMY42CfbuoSb3pB2kV6YPh1o5XsV9qAu4ncJDOd2xW5WW6J/S13lt8nyBI2wEjLwK2 6xWl5e+tJ1pB/7W7kuwmDBrhDcDd/As6jTii7qlWHjDBDWt/7OLjHSFGTy32LN0+QlRK er7dDm1sOE5pdWskEgkINaesMVXVI0pj/xx4JO6sV1aQ7gqOWmUQ9TR3gfJ65z/pJ5lW tI2g== MIME-Version: 1.0 In-Reply-To: <43f27741-bd1b-4c15-9822-c196b8b0396e@x39g2000yqx.googlegroups.com> References: <6c39594f-79cb-4d4f-967e-bbc3f68cdbdf@f8g2000pbf.googlegroups.com> <4fed59b7$0$29978$c3e8da3$5496439d@news.astraweb.com> <2662370.TGmo96CKe1@PointedEars.de> <87wr2oecf6.fsf@dpt-info.u-strasbg.fr> <4FEF7117.7000109@jollybox.de> <4fefb0ad$0$29988$c3e8da3$5496439d@news.astraweb.com> <43f27741-bd1b-4c15-9822-c196b8b0396e@x39g2000yqx.googlegroups.com> Date: Tue, 3 Jul 2012 02:55:48 +1000 Subject: Re: code review 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1341248151 news.xs4all.nl 6870 [2001:888:2000:d::a6]:49536 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:24781 On Tue, Jul 3, 2012 at 1:16 AM, Rick Johnson wrote: > py> 1 + 3 * 4 > should ALWAYS equal 16! > > With parenthesis only used for grouping: > py> a + (b*c) + d > > Which seems like the most consistent approach to me. Oh yes, absolutely consistent. Consistency. It's a CR 1/2 monster found on page 153 of the 3.5th Edition Monster Manual. Let's see. By your principle, we should evaluate the ** before the - in: 2**-1 Have fun. ChrisA