3

I have discovered a very odd behavior of Jupyter Notebook:

In [1]:

print("hello")
quit()
print("world")

Out [1]:

hello
world

The kernel does actually die afterward (I get a popup, "The kernel appears to have died. It will restart automatically."), but not before printing both.

Why does it work this way? Perhaps this has something to do with Jupyter's architecture that I don't know about.

Incidentally there is not actually an "Out[1]:" prefix, it just shows the output. That's probably an unrelated point though.

Stephen
  • 8,508
  • 12
  • 56
  • 96

0 Answers0