[Tutor] On a looping input, subsequent inputs are hidden
Peter Otten
__peter__ at web.de
Tue Jun 11 15:36:48 CEST 2013
Steven D'Aprano wrote:
> What's exit()? Is that sys.exit?
One of those things a newbie finds out immediately, a veteran never ;)
Since 2.5 site.py adds a Quitter object under the names "exit" and "quit" to
Python's built-ins. They are meant to provide the accidental Python user
with an obvious way to leave the interactive interpreter and /almost/
succeed:
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
According to
<http://docs.python.org/2/library/constants.html#constants-added-by-the-site-module>
"[t]hey are useful for the interactive interpreter shell and should not be
used in programs".
More information about the Tutor
mailing list