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

Mark Lawrence breamoreboy at yahoo.co.uk
Mon May 13 18:53:01 EDT 2013


On 13/05/2013 22:17, Alister wrote:
> On Mon, 13 May 2013 19:28:29 +0100, Fábio Santos wrote:
>
>> 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:
>>
>
> I would then still write it as not (x == y) to make it clear to myself &
> avoid any possible confusion although I think that X != Y is much
> cleaner.
> 2 lines from the zen stand out here:-
>
> Explicit is better than implicit.
> in the face of ambiguity refuse the temptation to guess.
>
> there are many features of Python (& other languages) i did not now when
> I started but have adopted once I understood what they were & how they
> worked. then again use what you are most comfortable with.
>
> Practicality beats purity
>

I much prefer the alternative <> for != but some silly people insisted 
that this be removed from Python3.  Just how stupid can you get?

-- 
If you're using GoogleCrap™ please read this 
http://wiki.python.org/moin/GoogleGroupsPython.

Mark Lawrence




More information about the Python-list mailing list