I No Longer Like Python's Boolean Comparisons
2017-08-21··39 words
1 or 2 # returns 1, not True
(1 or 1) == True # returns FalseYou spend half your life doing Boolean algebra and then Python just has to come and mess it all up.
1 or 2 # returns 1, not True
(1 or 1) == True # returns FalseYou spend half your life doing Boolean algebra and then Python just has to come and mess it all up.