syntax question: "<>" and "!=" operators
David Eppstein
eppstein at ics.uci.edu
Sun Mar 17 16:28:34 EST 2002
In article <mailman.1016396564.27134.python-list at python.org>,
mertz at gnosis.cx (David Mertz, Ph.D.) wrote:
> 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?!"
I disagree -- the "<>" makes sense only if you think about it for real
numbers, while "!=" matches the way I pronounce the symbol ("not
equals"), looks visually similar to the way I'd draw the symbol if I had
a better character set (equal sign with slash through it), and makes
sense for all types of objects.
But then, while I've switched from Pascal to C and vice versa several
times, it's been several years since I last worked with Pascal while I
still use several C-like languages, so maybe I'm biased from that.
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list