I am curious about the precedence of "x is not True" in Python. At first, I assume it means "!= True", but then I though the "not True" is surely of higher precedence that "is not". Yet the following seems to indicate the latter:
>>> 4 is not True
True
>>> not True
False
>>> 4 is False
False
>>> 4 is (not True)
False
It seems Python interprets "is not True" as a single expression, rather than "is (not True)" which is equivalent to "is False".
I am not new to Python programming, yet I have not thought deeply about this before. Can I safely assume that "is not" is an operator in itself that has higher parsing precedence that "not True"?