Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'operator': 0.03; 'subject:bug': 0.07; 'expected.': 0.09; 'cc:addr:python-list': 0.11; 'evaluating': 0.16; 'precedence': 0.16; 'precidence': 0.16; 'subject:python3': 0.16; 'wrote:': 0.18; '(not': 0.18; 'cc:addr:python.org': 0.22; 'looks': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'received:google.com': 0.35; 'skip:& 10': 0.38; 'issue': 0.38; 'rather': 0.38; 'sure': 0.39; '"not': 0.84; 'to:addr:ntlworld.com': 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:cc:content-type; bh=iZeWB0xeHkq3rL86qMzVc7/IuAji6ugXpTNxN1Vrl0k=; b=ZhBNEAuiGdxrQ14AwK7Iwlih4PEiWdeWNzUeY8W2xWGvfNCqR9SPV+mTkIoyLoRyLA c7WEGjYCixwMwyBPEk6HJgNZvLUcrQD/KjcHpmCqdPj0LEVKK/DS0OQLNSEHvdyIkNhe xroVUSEmxCDkvPktoacAk6HKFUHl/OnsP8Lnc8iZsww2z59plOHiV+HZ1ePUk8xFnWqY BwDgVzTkmCOYeTbn8w+k925N44HwpMPbcUdfgLeSjrh2f1iQh/QqKwmgc5rF16MXFCFA F3/ILDjAXM35gvUcci6BBLO3+xuJSmreNtLANzPHW0Yd9FRdBq385Kfoa+S8wMkQ88cX zFOA== MIME-Version: 1.0 X-Received: by 10.229.67.4 with SMTP id p4mr9237587qci.44.1368466010968; Mon, 13 May 2013 10:26:50 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 May 2013 18:26:50 +0100 Subject: Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ] From: =?ISO-8859-1?Q?F=E1bio_Santos?= To: Alister Content-Type: multipart/alternative; boundary=001a11c2ef787899ac04dc9cd27b Cc: python-list@python.org 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368466014 news.xs4all.nl 15956 [2001:888:2000:d::a6]:43210 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45252 --001a11c2ef787899ac04dc9cd27b Content-Type: text/plain; charset=ISO-8859-1 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) == y > rather than not (x == y) I can say for sure that the precedence is as expected. I always use "not ... == ..." Instead of !=. --001a11c2ef787899ac04dc9cd27b Content-Type: text/html; charset=ISO-8859-1


On 13 May 2013 11:04, "Alister" <alister.ware@ntlworld.com> wrote:
> this looks to me like an issue with operator precidence
>
> you code is evaluating as (Not x) == y
> rather than not (x == y)

I can say for sure that the precedence is as expected. I always use "not ... == ..." Instead of !=.

--001a11c2ef787899ac04dc9cd27b--