This answer to a related question contains some good info you may want to check out, explaining detail about the use of True
, False
, and None
in Python: https://stackoverflow.com/a/9494887/4174975
An explanation that's perhaps more specific to your answer can be found in the O'Reilly book Introducing Python by Bill Lubanovic, who refers to Python programs that use the concept of "truthiness" and "falsiness" to check for empty data structures as well as False
conditions. The author even has a subsection on page 88 titled "None is Useful" which elaborates:
None
is a special Python value that holds a place when there is nothing to say.
It is not the same as the boolean value False
, although it looks false when evaluated as boolean.
[...]
You'll need None
to distinguish a missing value from an empty value... zero-valued integers or floats, empty string (''), lists([]), tuples((,)), dictionaries({}), and sets(set()) are all False
, but are not equal to None
.
So that is the rationale behind why None
behaves the way that it does, and has subtle qualities apart from what you get with True
and False
or a 1
or a 0
.
As to the other part of your question, it appears to be a logical tautology: None
is False
because Python interprets the None
as being the equivalent of a null
for the reasons found above. By adding not
to a None
, you are inverting its boolean value, which turns it into a True
.