4 ms·
It's a two space error in a trivial example that no editor can help with. If the function is longer or their are a couple of additional levels of indentation,
by compiler-guy 8y ago
It's a two space error in a trivial example that no editor can help with.
If the function is longer or their are a couple of additional levels of indentation, and it isn't a print statement, but some additional logic, it is a hard problem to spot.
- mixmastamyk 8y agoNot true, look up indentation guides and whitespace visibility. Even my barebones editor has them and squashes ambiguity. Still at some point one needs to be responsible for the code they write, braces or not. Braces are not a guaranteed solution either, if the author gives up complete responsibility. Basically, this is a theoretical non-problem. The lack of braces pays back in readability every single day. Like +100 + -2, then complaining about the -2.
- compiler-guy 8y agoI write python all the time, with editors that support this. People do encounter this problem. You'll also note that I've never claimed braces were better, I'm just trying to explain OP's pont. You may not encounter it, but "Hey it works for me" is not a legitimate answer.