[Python-ideas] exit as a statement
Guido van Rossum
guido at python.org
Wed Feb 20 16:45:59 CET 2008
This goes against the idea of keeping the language small. Believe me,
it's been discussed to death, and the behavior you see now is the
solid outcome of that discussion.
On Feb 20, 2008 7:22 AM, BJörn Lindqvist <bjourne at gmail.com> wrote:
> An idea I have thought about for a while and it makes sense to me...
> $ python
> Python 2.4.2 (#1, Oct 13 2006, 17:17:08)
> [GCC 4.1.0 (SUSE Linux)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> exit
> 'Use Ctrl-D (i.e. EOF) to exit.'
> Argh! Do what I mean, stupid Python! And it is Ctrl+Z on Windows, not
> Ctrl-D. So exit could be a statement that does the same thing that
> sys.exit() does currently. Bare "exit" to terminate with return code
> 0, and "exit X" to terminate with return code X.
> mvh Björn
> Python-ideas mailing list
> Python-ideas at python.org
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-ideas