<> vs != was Re: A Suggestion for Python Colon Syntax

Rainer Deyke root at rainerdeyke.com
Sat Dec 23 14:15:58 EST 2000


"Thomas Wouters" <thomas at xs4all.net> wrote in message
news:mailman.977594956.22001.python-list at python.org...
> On Sat, Dec 23, 2000 at 12:15:25AM -0500, Tim Peters wrote:
>
> > Best guess is that "<>" will go away in P3K.  I jokingly told Guido it
was
> > clearly wrong for an inequality operator to look so symmetric, and he
forgot
> > to laugh <wink>.
>
> Well, excuse me, but it's clearly wrong for an equality test operator to
> look so much like an augmented assignment statement ! I definately prefer
> '<>' myself, anyway, I just wish I could use it in C without turning
towards
> preprocessor macros :)

I dislike <> because to me A <> B implies A > B or A < B.  This does not
logically apply to some data types where no ordering is defined.  Of course
in Python, A <> B (and A != B) does imply A > B or A < B because of the way
comparison is implemented.


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list