4 ms·
Editors know that a python line ending in a colon must be indented and so indent it automatically. It wouldn't be hard to use the same method to reindent it.
by mixmastamyk 12y ago
Editors know that a python line ending in a colon must be indented and so indent it automatically. It wouldn't be hard to use the same method to reindent it.
- unwind 12y agoNo, lines following a line ending in a colon must be indented. But the OP's point is that you can't know how many lines make up the indented block, since there is no explicit block-end-marker left if the indent is gone.
- balquhidder 12y ago>No, lines following a line ending in a colon must be indented. Except if you have, for example, an if statement. if x: y() is valid.
- mixmastamyk 12y agoYep, that's what I meant.