Well == is a question or a query rather than a declaration of the state of things because it isn’t necessarily true.
You can write
a = (3 == 4)
which is perfectly valid code; it will just set a
to be false
, because the answer to the question “does 3 equal 4?” is no.
I think you’ve got it anyway.
It’s not too bad if you strictly enforce Pyright, Pylint and Black.
But I have yet to work with Python code other than my own that does that. So in practice you are right.