Differences of "!=" operator behavior in python3 and python2 [ bug? ]

Fábio Santos fabiosantosart at gmail.com
Mon May 13 14:28:29 EDT 2013


I think it is more readable. When doing more complicated statements I use
!= instead, but when it's a single test I prefer not … ==

It's a personal thing. It may also have to do with the fact that I didn't
know python had != when I was a novice.
On 13 May 2013 19:08, "Ned Batchelder" <ned at nedbatchelder.com> wrote:

>
> On 5/13/2013 1:26 PM, Fábio Santos wrote:
>
>
> On 13 May 2013 11:04, "Alister" <alister.ware at 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130513/5b0120c0/attachment.html>


More information about the Python-list mailing list