On 8/10/2013 8:42 PM, Gary Herron wrote:
But for each of your examples, using "==" is equivalent to using "is". Each of if something == None if device == _not passed if device != None would all work as expected. In none of those cases is "is" actually needed.
class EqualAll: def __eq__(self, other): return True ea = EqualAll() print(ea == None) print(ea == float('nan')) >>> True True -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list