In Python 3...
- Sample 1:
s: str = None
b: bool = True
b = (s != None) and (s != "some-not-allowed-value")
print (b)
Displays False
(as it seems intuitive)
- Sample 2:
s: str = None
b: bool = True
b = (s) and (s != "some-not-allowed-value")
print (b)
Displays None
Why ? How is that s
field evaluated ?