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

Ned Batchelder ned at nedbatchelder.com
Mon May 13 14:08:39 EDT 2013


On 5/13/2013 1:26 PM, Fábio Santos wrote:
>
>
> On 13 May 2013 11:04, "Alister" <alister.ware at ntlworld.com 
> <mailto: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/24d1e400/attachment.html>


More information about the Python-list mailing list