> It's best to think of the notebook as a REPL.
With sections of the history easily replaced.
> So you'd want to run `del foo` on the old name.
And then delete this line, because if you leave it in it'll break when you try and run the file all the way through.
> Notebooks are REPLs, and it's better to get used to that than to try to enforce some confusing time traveling.
Do you mean by treating them as append only and never rerunning any cells?
> In fact, this is a good counterexample. Why should the notebook delete the old variable name? What if its value is a thread currently executing?
The notebook has no idea if it can or can't, but that doesn't mean that leaving it in is good it's simply the only realistic option.