Kimball Leavitt <kimballleav...@gmail.com> added the comment:

I know that many people do something like:

def do_EOF(self, arg):
    return True

to exit the program when you press Ctrl+d. Others might prefer something like 
ngie https://bugs.python.org/issue13214#msg145856:

def do_EOF(self, arg):
    raise EOFError

The issue that I have is if the command you enter is 'EOF' (or 'EOF --some 
--arg'), you end up calling your do_EOF function. I think this unintended side 
effect could be avoided if the check for EOFError was removed and the exception 
was just raised. (see 
https://github.com/python/cpython/blob/master/Lib/cmd.py#L127).

----------
nosy: +Kimball Leavitt

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue13214>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to