Not exactly what you want I know. But None is close. >>> not 0 1 >>> not None 1 >>> ... def myNot(x): ... if x != None: ... return not x ... return x ... >>>