On 9 Jun 2008, at 05:51, Patrick Quinn-Graham wrote:
Considering it's an interactive programming shell, and it tells you exactly how to quit, I disagree. If it just said "No. Invalid syntax. You're doing it wrong" without providing any hint as to how to fix it, then I'd agree. It even says "or Ctrl+D". Ctrl+C should be as helpful - I'll accept that.
Eh... Python is my favourite programming language (i.e. the one I generally hate the least), but I'd disagree with that. quit/exit are intended (nearly-?) exclusively for use in the interactive interpreter, and given that, I think it's rather unreasonable for them to be callable objects in the global __builtins__ namespace available everywhere to every Python script. I'm certain that using exit() non- interactively would be frowned upon in favour of sys.exit() and such. All in all, they're basically intended only to be used as commands to the interactive interpreter, and as such, I'd find it perfectly reasonable to special-case them as statements available in the interactive shell.
(Not that it's a big deal. I always just do Ctrl+D anyway; that way I don't need to remember whether the particular language/shell I'm using wants "quit" or "exit" or "bye" or "gtfo" or "begone with thee, knave" (that one's Perl 6) or what.)
