[IPython-user] Do you really, truly, cross-your-heart-and-hope-to-die want to quit?
Sun Dec 6 04:32:23 CST 2009
2009/12/6 Ville M. Vainio <firstname.lastname@example.org>:
> On Sun, Dec 6, 2009 at 8:45 AM, Dr. Phillip M. Feldman
> <email@example.com> wrote:
>> When I want to quit from IPython, I really hate the prompt "Do you really
>> want to exit ([y]/n)? y". I
>> feel as though my judgment is being called into question. How do other
>> people feel about this?
> The purpose of this is to annoy users enough to start using 'Exit'
> with capital E ;-).
The real bug is that 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).
This is now:
so we don't lose track of it.
More information about the IPython-user