News for hackers. Stuff that matters.
Re:Why People Should Learn Python by rglullis on Wednesday August 24, 2016 @05:45AM (#12350794)
"Making it hard to copy-paste code from the web" is something that I would consider a feature, to be honest.
Re:Why People Should Learn Python by dalke on Wednesday August 24, 2016 @07:00AM (#12351082)
Some similar failure cases are: 1) when I make a presentation using Keynote, it drops the leading spaces when it exports to PDF, so my students can't simply copy/paste my example code. 2) the interpretation of blank lines with no indentation on the repl means "end of current code", which is different than in a .py file. This means if I copy&paste from my in-development code to the repl, I can get syntax error unless I carefully ensure that all blank lines inside of indented code blocks are also indented.
Re:Why People Should Learn Python by rglullis on Wednesday August 24, 2016 @07:06AM (#12351108)
For (2), ipython and %cpaste are your friends.