Newbie: Truth values (three-valued logic)

Darrell news at dorb.com
Tue Jun 15 21:48:40 CEST 1999


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
...
>>>






More information about the Python-list mailing list