Just curious: would it ever happen in practice?
sooner or later the __eq__ method will be redefined for some class, then reworked, and then.. == None might not be what was supposed to be..
or, my favorite, x='a' ; (x,)[0] == x[0] == x .. but are only equal until x changes to something not-1-long-sequence..
So, I use "is" since "is" is not a context dependent concept, like equals is. I've seen this once in the wild, and it made sense for its use:
def __eq__(self, other): return bool(self) == bool(other)
sooner or later the __eq__ method will be redefined for some class, then reworked, and then.. == None might not be what was supposed to be..
or, my favorite, x='a' ; (x,)[0] == x[0] == x .. but are only equal until x changes to something not-1-long-sequence..