Closed henryfoster closed 3 years ago
This shouldn't happen with the redefinition of a function. Usually, this kind of issue happens with the use of const
.
The answer your question depends on the frontend you are using. For example, in the jupyter notebook, the button »
restarts the kernel and reruns all the cells. You could also define your own keyboard shortcuts. By default, the jupyter notebook has already defined a keyboard shortcut just to restart a kernel: Esc
0
0
Hi,
if I define a function in a cell and run it twice I get an exception telling me that the function is already defined. So each time I have to restart the kernel if I want to rerun my script. Is there a way to prevent this? I would like the cell just rerun everytime I select it and press play.