Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!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.013 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'operator': 0.03; 'that?': 0.05; 'url:au': 0.05; 'subject:bug': 0.07; 'expected.': 0.09; 'dog': 0.16; 'evaluating': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'precedence': 0.16; 'precidence': 0.16; 'subject:python3': 0.16; 'wrote:': 0.18; '(not': 0.18; 'fairly': 0.24; 'looks': 0.24; 'header:In-Reply- To:1': 0.27; '[1]': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'text': 0.33; '"the': 0.34; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'received:google.com': 0.35; '14,': 0.36; "he's": 0.36; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'issue': 0.38; 'pm,': 0.38; 'rather': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'full': 0.61; 'saving': 0.69; '"not': 0.84; 'batchelder': 0.84; 'dog"': 0.84; 'obvious.': 0.84; '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:content-transfer-encoding; bh=vYGtHVLxWGv/uRGPGslhtts9vS24AoxSU9DK4IfttGc=; b=Ycgqj9u1Rm1jRsxzGD+5qdHx7jqibM10jJbE/jaTdfFK/DEUpzcC1xx51A/GmL91pS 4F0oqueEceDE9eGX7z2SZrpbJIvEqlJlRWfvqi6FQLotzgKpg1mB57HGUrtyT4BZJLnm jiOJLUXlqfroyjNyqHXi2aFPP6yi7XdV7dRUhbgJdgU0TFNxcU9EeqKazKYHUL+wFxmS eJSiLoGsF0LjdEtS83cQEZ/QuD/Nosrn876TsGqZWezT2edDZY+w2GLg6cy6hkkJwu34 aIejFFeON542v1iFnmhwLQu8vf5Iwm/h0RSigriFGS9DwOOyaPLkQ8Wio1YFlEidZ2Pf 0Hhw== MIME-Version: 1.0 X-Received: by 10.52.120.83 with SMTP id la19mr16310911vdb.58.1368468922870; Mon, 13 May 2013 11:15:22 -0700 (PDT) In-Reply-To: <51912C27.3020809@nedbatchelder.com> References: <51912C27.3020809@nedbatchelder.com> Date: Tue, 14 May 2013 04:15:22 +1000 Subject: Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ] From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368468931 news.xs4all.nl 15967 [2001:888:2000:d::a6]:41343 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45259 On Tue, May 14, 2013 at 4:08 AM, Ned Batchelder wro= te: > > On 5/13/2013 1:26 PM, F=E1bio Santos wrote: > > > On 13 May 2013 11:04, "Alister" wrote: >> this looks to me like an issue with operator precidence >> >> you code is evaluating as (Not x) =3D=3D y >> rather than not (x =3D=3D y) > > I can say for sure that the precedence is as expected. I always use "not = ... > =3D=3D ..." Instead of !=3D. > > > > If you don't mind my asking, why do you do that? I think it's fairly obvious. Like the stumpy-tailed dog from "The Loaded Dog" [1], he's saving up the !=3D operator in case he needs it later. ChrisA [1] Full text here. http://jendi.bowmeow.com.au/loadeddog1.html