ipython/ipython — comment on commit bd503234b04e2bb1e1aa5cfd48bd2592f392318d
File: IPython/lib/inputhookqt4.py line 105
By cboos:

That `mgr.clear_inputhook()` will re-enable the CTRL+C, so any KeyboardInterrupt received in the few lines until the function exit may risk to result in an other internal error, so it's probably best to move that call till after print("Got exception...").