[Python-ideas] exit as a statement

Christian Heimes lists at cheimes.de
Wed Feb 20 18:07:05 CET 2008

BJörn Lindqvist wrote:
> What would the disadvantages of adding exit as a statement be? Would
> it make Python worse? Is there any other non-magical and
> straightforward solution to make exit to "do what I mean"?

We are trying hard to reduce the amount of statements and builtins. exit
as a statement isn't worth the extra code. There are already plenty of
ways to exit an interpreter process:

raise SystemExit
exit() (interactive prompt)
CTRL+Z or CTRL+D (interactive prompt)


More information about the Python-ideas mailing list