Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'operator': 0.03; 'that?': 0.05; 'subject:bug': 0.07; 'expected.': 0.09; 'cc:addr:python- list': 0.11; 'evaluating': 0.16; 'precedence': 0.16; 'precidence': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'subject:python3': 0.16; 'wrote:': 0.18; '(not': 0.18; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; '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; 'code': 0.31; 'issue': 0.38; 'pm,': 0.38; 'rather': 0.38; 'sure': 0.39; 'to:addr:gmail.com': 0.65; 'to:charset:iso-8859-1': 0.74; '"not': 0.84; '2013': 0.98 Date: Mon, 13 May 2013 14:08:39 -0400 From: Ned Batchelder User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: =?ISO-8859-1?Q?F=E1bio_Santos?= Subject: Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ] References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------000903090700040800040805" 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: 64 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368468525 news.xs4all.nl 15997 [2001:888:2000:d::a6]:35540 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45256 This is a multi-part message in MIME format. --------------000903090700040800040805 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit On 5/13/2013 1:26 PM, Fábio 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) == y > > rather than not (x == y) > > I can say for sure that the precedence is as expected. I always use > "not ... == ..." Instead of !=. > > If you don't mind my asking, why do you do that? --Ned. --------------000903090700040800040805 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 5/13/2013 1:26 PM, Fábio Santos wrote:


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 !=.



If you don't mind my asking, why do you do that?

--Ned.

--------------000903090700040800040805--