X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 195.154.70.45 Path: csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'operator': 0.03; 'binary': 0.05; 'rejected': 0.05; 'interpreted': 0.07; 'prefix': 0.07; 'subject: + ': 0.07; 'precedence': 0.09; 'received:internal': 0.09; 'subject:not': 0.11; 'syntax': 0.13; "'+'": 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'operator.': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.212': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'table;': 0.16; 'unary': 0.16; 'wrote:': 0.16; "shouldn't": 0.18; '2015': 0.20; 'sat,': 0.23; 'header:In-Reply-To:1': 0.24; 'chris': 0.26; 'arithmetic': 0.29; 'error.': 0.31; 'possibly': 0.32; 'url:python': 0.33; 'could': 0.35; 'url:org': 0.36; 'to:addr :python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'being': 0.37; 'received:66': 0.38; 'rather': 0.39; 'to:addr:python.org': 0.40; 'from:no real name:2**0': 0.60; 'header:Message-Id:1': 0.61; 'matter': 0.63; 'different': 0.63; 'jul': 0.72; "'not'": 0.84; 'url:reference': 0.91 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=HhwOSp6uZa+QzrK7jc5iC5TKxbE=; b=a1bDy5 vie2O8214SotSpI34HpudzEQxkSWqUjKgmXi8tDJpv4ixw6uqj3A35WUzwSud4r0 gBtq6MXSCCU9XslXjeNGaxAbLiRA9mUUy0B6aIa+wym5iA7gbhE5T7W0VV4s09GV nFNzzYTB7mgB9/KZoPEiVtWGEv1mCi596IzOo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=HhwOSp6uZa+QzrK 7jc5iC5TKxbE=; b=bM9xxim35PjjAI5W9nOKHUaLcrIaq20HObFA6tnfvALQnTp vlwjuJ/7cgcrtSD4doBqUGdHIDNe75PzNTcCnvi25SnMSsZPfu0WqR0EMXZQDBS9 Ff1ZH6plsSaS2eIB9RYsv7CgZlosEbVZ/lbbR8VH4Br2He67Fo0DRWDNhvbk= X-Sasl-Enc: dY74m6iU775YI/x335sG9DQumqnB4tAWdRfRFfqlmDk6 1436647589 From: random832@fastmail.us To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-bfc056ae In-Reply-To: References: <01ec6551-1f40-42b0-9406-036030591519@googlegroups.com> <55a0f241$0$2933$e4fe514c@news2.news.xs4all.nl> <55a0fa36$0$2935$e4fe514c@news.xs4all.nl> Subject: Re: 0 + not 0 Date: Sat, 11 Jul 2015 16:46:29 -0400 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1436647599 news.xs4all.nl 2967 [2001:888:2000:d::a6]:45694 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:93703 On Sat, Jul 11, 2015, at 07:20, Chris Angelico wrote: > On Sat, Jul 11, 2015 at 9:12 PM, Luuk wrote: > > It can occur in an arithmetic expression, and 'not' has a higher precedence > > than '+' > > (https://docs.python.org/2/reference/expressions.html#operator-precedence) > > > > I think you're misreading the table; 'not' has *lower* precedence than > '+'. Precedence shouldn't actually matter when resolving a unary prefix operator on the right of a binary operator. I don't understand how this could possibly be interpreted in a different valid way rather than being spuriously rejected as a syntax error.