All Questions
Tagged with static-typing logical-operators
1
question
9
votes
5
answers
1k
views
How to make logical operators that return operands consistent in a statically typed language?
In C++, 3 || 4 returns true. But in Python, 3 or 4 returns 3 instead. That's a logical operator that returns its operand. I don'...