2 ms·
I've noticed editors auto fixing Python indentation while copy-pasting. I think VSCode does it, so it's definitively a solvable problem :-) (I've disabled this
by jraph 6y ago
I've noticed editors auto fixing Python indentation while copy-pasting. I think VSCode does it, so it's definitively a solvable problem :-)
(I've disabled this feature in my main editor for a long time though, so I'm used to hit Tab/Shift+Tab as many times as needed when pasting)
- pmontra 6y agoYep, but no editor can decide if the code must align with the last line of a loop or be indented out of the loop. I got at least one bug in production because of that, and a test that didn't catch the error.
- jakear 6y agoVS Code tries to do it, but it’s heuristic based and generally fallible. (Disclaimer, work on vscode, not on python extension) I much prefer working in languages wherein the series of tokens absolutely defines the semantics (as opposed to Python where the series of tokens + the context define the semantics)