On Fri, 23 Jan 2009 16:28:15 -0800, Gary Herron wrote: > If something > *equals* None, it also *is* None. This is a consequence of the fact > that there is only ever one value of None anywhere in the system. ... > The only way something can *equal* None is if it *is* None.
>>> class Empty: ... def __eq__(self, other): ... return not bool(other) ... >>> e = Empty() >>> e == None True >>> e is None False -- Steven -- http://mail.python.org/mailman/listinfo/python-list