News for hackers. Stuff that matters.
Re:On Repl-Driven Programming by joshlk on Sunday January 03, 2021 @05:15AM (#25620866)
You can also add breakpoints which automatically occurs when exceptions are raised. Which is similar to the breakloop functionality mentioned in the article.
Re:On Repl-Driven Programming by djm_ on Sunday January 03, 2021 @05:30AM (#25620935)
Yes, running pytest with the --pdb flag will drop you into the debugger on an unhandled exception which gets a comparable workflow but it's not quite the same as, a) writing tests to file first is not repl-driven development, and b) you generally have to think about doing it first.

In an ideal repl-driven world you could write the test in the repl entirely and commit it to disk once you're ready.

Re:On Repl-Driven Programming by anentropic on Sunday January 03, 2021 @11:28AM (#25622724)
I find ipython + ipdb super useful in this regard

But AFAIK neither provide the feature described in the article where you can continue running after an unhandled exception.

Re:On Repl-Driven Programming by jmuhlich on Sunday January 03, 2021 @01:48PM (#25623967)
True, but running the %debug magic command in IPython immediately after an unhandled exception drops you into the debugger at the point of the raised exception, complete with the full interpreter state including the stack. It doesn’t permit edit-and-continue but you can still evaluate expressions (including calling any function) to explore what went wrong without having to recreate the situation inside an explicit pdb session.