Expected behavior
When I run a script it should start with a “clean” interpreter. Variables from the last run should not reappear unless they are set, and I should get a “name ‘x’ is not defined” error if I use a value before setting it, for example if I delete or comment out the line where it used to be set.
Actual behavior
Variables defined in the script are recycled, causing different behaviour if the script is re-run after editing, compared to loading it later into a fresh tab and running.
Also modules loaded in an earlier run of the script persist if I comment out the “include” line. reload(module)
doesn’t work very well if I’ve just edited the module in another tab, the traceback text-of-offending-line refers to the new version while my script actually called an earlier one.
Steps to reproduce the behavior
Enter and run the following:
x=1 print (x)
and then comment out or delete the line “x=1” and run again.
Platforms affected
Mantid Workbench 4.1 on Windows, possibly others.