Use of the "is" statement

Christian Heimes lists at cheimes.de
Fri Jun 27 11:44:31 EDT 2008


Joel Corbin wrote:
> I'm trying to clarify what exactly the behaviour of the is statement is (or
> should be).  ...

People often think that "is" is part of the comparison operator set. The
"is" statement does not compare two objects. Never ever use "is" to
compare strings or numbers.

Christian





More information about the Python-list mailing list