On 17/06/2020 17:25, Guido van Rossum wrote:
I presume Jupyter also lets you import code from a file, which you edit outside, Jupyter? Is,that not an option for you?
It's not the file that is the problem, but the lack of it. If I didn't want to cover classes within the __main__ module, I wouldn't have gotten myself into this in the first place. If it were just the technical aspects, I'd still think recording the filename would be the a good solution, I just never thought about the cost of the process enough. Maybe the other fundamentally sound solution would be to treat the __main__ module of an interactive session as a single file with ever incrementing line numbers. Making it more explicit that Jupyter/IPython is a world of amending only would solve so many other problems as well and create a world of entirely new ones. Best regards Thomas