Exiting from python shell

James Stroud jstroud at mbi.ucla.edu
Thu Jul 19 01:27:48 CEST 2007

Tobiah wrote:
> For years now, I've been exiting the shell by typing 'exit\n',
> being chid by the shell, and then typing ^D.  I can't
> remember a time that I typed the ^D the first time.  Call
> me an idiot if you must, but since someone took the trouble
> to catch the command 'exit' in a special way, would it have
> been so awful to just let it be a way to exit when the shell?
> Thanks,
> Toby

Yes, this would have required a ground-up approach to redesigning the 
python language, transmuting it to something like a cross between lisp 
and COBOL and would have rendered it impossible to author with C because 
of the way C implements pointers--hardcoding in assembly would likely be 
required. Beyond that, exiting an interpreter is not known in computer 
science and has been shown impossible by Goedel himself in a series of 
monographs on the topic. Thus, to exit python via a keyword would 
require also reformulating mathematics as we know it. Furthermore, such 
a change would propagate itself, via the observer effect, to the 
behavior of sub atomic particles via ill-defined quantum-mechanical 
affects and would likely result in the reversal of the Second Law of 
Thermodynamics, wherein your refrigerator would end up heating its 
contents and milk would spontaneously spoil, among other anomalies.

For these reasons, you might propose a "quit" keyword.


James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095


More information about the Python-list mailing list