D
drs
I just upgraded my Python install, and for the first time have True and
False rather than 1 and 0. I was playing around at the command line to test
how they work (for instance, "if 9:" and "if True:" both lead to the
conditional being executed, but True == 9 -> False, that this would be true
was not obvious to me -- "True is True" is True, while "9 is True" is false
even though 9 evaluates to True.) Anyhow, in doing my tests, I accidentally
typed
rather than
and I lost the False statement.
Thus,
0
To get it back, I found that I could do
which seems to put False back to False, but this seems weird.
throws an error (can't assign to literal), why doesn't False = 0 throw the
same error? Also, why doesn't False = 0 make
0
Instead of False?
-d
False rather than 1 and 0. I was playing around at the command line to test
how they work (for instance, "if 9:" and "if True:" both lead to the
conditional being executed, but True == 9 -> False, that this would be true
was not obvious to me -- "True is True" is True, while "9 is True" is false
even though 9 evaluates to True.) Anyhow, in doing my tests, I accidentally
typed
rather than
and I lost the False statement.
Thus,
0
To get it back, I found that I could do
which seems to put False back to False, but this seems weird.
throws an error (can't assign to literal), why doesn't False = 0 throw the
same error? Also, why doesn't False = 0 make
0
Instead of False?
-d