Hacker News new | ask | show | jobs
by wink 1269 days ago
I've written a lot of python in my life (but most of the time not as my main day-to-day language) so whenever I had to try something small in a REPL I do paste. I guess it would work to highlight a piece of code and run it externally with a shortcut, but I've never set that up, so I did indeed run into this problem more often whenever I was just taking up Python again (for example I find [x for x in ....] kinda horrible and have at times fat-fingered if it's twice nested)
1 comments

Use ipython's magic function, %paste. If you need to make minor edits, %cpaste. If you're exploring, consider using a notebook.