4 ms·
I think the reason not to write `== None` is that classes can override `==`: class C: def __eq__(self, other): return True C() == None # True
by pansa2 6y ago
I think the reason not to write `== None` is that classes can override `==`:
class C:
def __eq__(self, other): return True
C() == None # True
C() is None # False