Is it okay to write code that depends on this ...
>>> 1 is None
False
>>> 1 is None and b
False
>>> b and 1 is None
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'b' is not defined
Recommended Posts