Cyril Bazin wrote: > I agree. None is an object! If you want to compare an object to another > object why not using "=="?
The term "compare" is ambiguous. If you want to compare for *identity*, you use "is". If you want to compare for equality, you use "==". In most cases with None you are interested in identity, not equality. It's that simple. As I said, the archives have extensive discussions about this with lots of the nuances already covered in far more detail than I'm going to do again in this thread. (The advice was free, so you're quite welcome to consider it to be worth what you paid.) -Peter -- http://mail.python.org/mailman/listinfo/python-list