fork download
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)
Success #stdin #stdout 0.06s 9568KB
stdin
Standard input is empty
stdout
True
False
False
True