class X:
    def __bool__(self):
        return False
        
x = X()

print(not x)
print(x == None)

class Y:
    def __eq__(self, other):
        return True
        
y = Y()

print(not y)
print(y == None)