For example, I modified my IPython config to always activate https://ipython.org/ipython-doc/3/config/extensions/autorelo...
It works well for modules with redefined functions. So if you do
from module import f1, f2
ans1 = f1()
ans2 = f2(ans1)
and f2 fails, then you can just modify the code of module and relaunch `ans2 = f2(ans1)`.What is not available is reloading classes, for example if it looks like:
from module import Class
c = Class()
c.f1()
c.f2()
and there is a bug in f2, then the class won't be redefined.I guess there is no perfect way to do it (for example what if f2 needs some variables defined in Class.__init__), but the situation is the same for Lisp with its dynamic typing.
So maybe the situation would be to have some command like `%reload Class`.
The other obstacle is restarting from a frame, and I understand that Python's standard exception handling doesn't allow that. But pdb exists so there should be a solution.