Hacker News new | ask | show | jobs
by thurn 5303 days ago
> If you're debugging at the interactive prompt consider debugging with a small script instead.

I don't understand this suggestion. The ability to interact with my code via the REPL is a very important python feature for me, is the author suggesting I abandon that?

2 comments

I think the author is just saying if you're debugging something in a REPL and you're finding you need to reload() frequently, then you might want to consider switching to debugging with a small script instead (and of course there's no reason the script couldn't just import the things you're debugging, and then dump you into a REPL).
You mean like when I debug a script as

    ipython>import foo as t
    ipython>t.test(10,20)
    ipython>reload t
Roughly 2/3rds of this guy's rant is off base. Maybe if he had flushed out his arguments with citations, but seriously. It is all opinion.

Reasoning with opinion is dumb.

You did the same thing. What's so bad about reasoning with opinion?
You just got stabbed by an ironicaltite
You can use python -i to enter interactive mode after executing a script. Maybe I should clarify that part
Ooh, dunno why I thought that wasn't supported in IPython too before, but it is. Lovely.