2 ms·
It's a voluntary design choice since the beginning of Python to avoid the very common mistake of doing: while continue = "yes": instead of: while con
by sametmax 8y ago
It's a voluntary design choice since the beginning of Python to avoid the very common mistake of doing:
while continue = "yes":
instead of:
while continue == "yes":
Those mistakes introduce bugs that are hard to spot because they don't cause an immediate error, linters can hardly help with them and even a senior can make them while being tired.
- bluecalm 8y agoI don't know about linters but GCC warns me about that every time I make that typo. They could just require parenthesis when assignment value is used as boolean.