'==' vs. 'is' behavior

piet at cs.uu.nl piet at cs.uu.nl
Wed Dec 1 04:16:28 EST 1999


>>>>> Bill Janssen <janssen at parc.xerox.com> (BJ) writes:

BJ> Actually, the presence of "is" and "==" in Python is one of the nicer
BJ> features.  "is" is the Lisp "eq", while "==" is the Lisp "equal".
BJ> These are really the two comparisons from Lisp that make the most
BJ> sense.

BJ> Java, on the other hand, only gives you "eql"!  Ugh!  Bletcherous!

Huh???
Java has == which is equivalent to Python's `is' for objects and == for
primitive values, and it has the equals method for objects which is
like Python's ==. 
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: Piet.van.Oostrum at gironet.nl




More information about the Python-list mailing list