4 ms·
In the command line interpreter you should use %paste, which will paste with the corrected indentations. I'm seriously baffled by people complaining about inde
by Certhas 10y ago
In the command line interpreter you should use %paste, which will paste with the corrected indentations.
I'm seriously baffled by people complaining about indentation errors. The indentation is so tightly tied to the meaning of the code, isn't it almost always obvious?
Do you use an editor where you have to indent each line individually rather than moving all selected lines with tab/shift-tab?
- pmontra 10y agoI'm using emacs. When I paste I lose the selection. I'll check if there is some special command in the Python mode for that. I'll also google that %paste. Thanks. Edit: I googled that and installed IPython 5.1.0 (sudo pip install ipython) I can paste lines at any indentation level now and they work, or type spaces at the beginning of the line. %paste is not required. I would upvote you again if I could. Thanks again!