syntax question: "<>" and "!=" operators

Mike Dean klaatu at evertek.net
Sun Mar 17 15:58:54 EST 2002


* David Mertz, Ph.D. <mertz at gnosis.cx> [2002-17-03 15:08]:
> Nonetheless, I think of the natural language semantics of the
> symbols--or maybe better "insinuations"--prefers '<>' to '!='.  The
> (good) one suggests "is greater than or less than (but not equal to)".
> I know that not everything is technically in an order relation, but it
> still "makes sense" at a first approximation.  The (bad) one looks like
> some odd sort of augmented assignment.  "Hmmm... assign, what?  The
> negation of the right side to the left side?!  The LHS negated with the
> RHS?!"

One thing that's always baffled me on this issue (along these lines) -
why does Python have != as a not-equal operator, when ! is not the not
operator?

-Michael

-- 
The generation of random numbers is too import to be left to chance
                -- OpenBSD Fortune database




More information about the Python-list mailing list