exit, quit, exit() and quit() should exit unconditionally

Bug #493098 reported by Fernando Perez on 2009-12-06
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Committed
Fernando Perez

Bug Description

When you type exit() or quit(), we should always exit unconditionally, like we do with %Exit. But there's a valid use case for a safety check: when an EOF exception is triggered, which on *nix happens via a simple C-d keystroke. That is very easy to touch by accident, especially if you have emacs readline bindings, where C-d on a non-empty line deletes characters, but C-d on an empty line produces EOF. So the difference of a single character on the current line changes the behavior from deletion to ending the program, and it might cost you a lot of state you took a long time to compute.

So the behavior should be:

- exit, quit, %Exit, etc: stop bothering people with questions and just quit.

- EOF exception: ask users by default, this can be configured to not ask anymore if they want (but then, they can't complain if a single misplaced C-d kills their hours-long session).

Related branches

Fernando Perez (fdo.perez) wrote :

Fixed in my trunk-dev under review, should be in trunk soon.

Changed in ipython:
assignee: nobody → Fernando Perez (fdo.perez)
importance: Undecided → Medium
status: New → In Progress
Changed in ipython:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers