Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'operator': 0.03; 'subject: + ': 0.07; 'cc:addr:python-list': 0.09; 'minus': 0.09; 'precedence': 0.09; 'subject:not': 0.11; 'syntax': 0.13; "'+'": 0.16; 'footnote': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'unary': 0.16; 'wrote:': 0.16; 'case.': 0.18; 'instance,': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'referring': 0.22; 'code,': 0.23; 'sat,': 0.23; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'message-id:@mail.gmail.com': 0.27; 'raise': 0.29; 'error.': 0.31; "can't": 0.32; 'source': 0.33; 'list': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'there': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'does': 0.39; "you'll": 0.61; 'details': 0.62; 'better.': 0.66; 'jul': 0.72; 'special': 0.73; "'not'": 0.84; 'chrisa': 0.84; 'samedi': 0.84; 'to:none': 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:cc :content-type:content-transfer-encoding; bh=y1M5sxumraNXInRMLRcwHbjwX4Kl25GlItq8lE1gKhs=; b=aS6m/XiDAmm2pEHb/nto7mKhHIF+UKySBzSVNJUlI1XJQ7arYdZuwjqgEIx28t2Z6w tii/JuN9zoL8y6B6+B3CCzX1OLsGvTSxVw77rlnGNYyT3ic0ek5Ptr1/9Xn+Nz5QU1qL FoVLvxUqBLA3AuqK0dpvjr4qJpGVBCHpN7Gx84jQoh3u62pYIc8hLJvBCip6hjq7PJxM lToQQzWcZsaUr7QZmm9UcO2KYCQVCKHHZ3E4y1whGAnHm/QY4lA3tXAEZNsz4PQWZ69Q yImVbMo1kFC+6DevO6iNg20tD43XzJ7Mq1erNmTlMqZ8GjxSrUAZ74Ve2EK8zwAk0FeA +81w== MIME-Version: 1.0 X-Received: by 10.50.7.104 with SMTP id i8mr3422760iga.50.1436616304064; Sat, 11 Jul 2015 05:05:04 -0700 (PDT) In-Reply-To: <57a9e100-5783-4d95-bb41-f1d19e757c16@googlegroups.com> References: <01ec6551-1f40-42b0-9406-036030591519@googlegroups.com> <55a0f241$0$2933$e4fe514c@news2.news.xs4all.nl> <55a0fa36$0$2935$e4fe514c@news.xs4all.nl> <55a0fe55$0$2875$e4fe514c@news.xs4all.nl> <57a9e100-5783-4d95-bb41-f1d19e757c16@googlegroups.com> Date: Sat, 11 Jul 2015 22:05:03 +1000 Subject: Re: 0 + not 0 From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1436616312 news.xs4all.nl 2834 [2001:888:2000:d::a6]:40706 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:93682 On Sat, Jul 11, 2015 at 9:54 PM, candide wrote: > Le samedi 11 juillet 2015 13:31:03 UTC+2, Luuk a =C3=A9crit : > >> >> But operator precedence of 'not' is higher than of '+' ???? > > > Right but what does this prove? For instance, unary minus has higher prec= edence than exponentiation but the expression > > 2 ** -1 > > doesn't raise a syntax error. You'll see down below a footnote referring to this as a special case. But I don't know the details of how it all works, so short of digging into the source code, I can't explain this any better. There are others on this list who can, I believe. ChrisA