3 ms·
Is this really different from braces? If you have for i in range(0, n) { for i in range(0, n) { doInner() } doOuter()
by xigoi 5y ago
Is this really different from braces? If you have
for i in range(0, n) {
for i in range(0, n) {
doInner()
}
doOuter()
}
and you accidentally move the first closing brace below the next line, precisely the same will happen.
- MauranKilom 5y agoIf you do that, the indentation will be clearly wrong/mismatched and a compiler (or linter) can bark about it. No such possibility in python.
- akersten 5y agoMore likely the IDE just auto-indents the errant line and the programmer is still none-the-wiser.
- Jyaif 5y agoIn Python the mistake involves using the wrong invisible characters. It's totally bonkers.
- xigoi 5y agoSpaces are visible, unless they're at the end of a line.