classification
Title: Import needed to quit Python?
Type: Stage:
Components: Documentation Versions: Python 3.0, Python 3.1, Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: MLModel, georg.brandl
Priority: normal Keywords:

Created on 2009-09-17 23:38 by MLModel, last changed 2009-09-18 07:22 by georg.brandl. This issue is now closed.

Messages (3)
msg92799 - (view) Author: Mitchell Model (MLModel) Date: 2009-09-17 23:38
Section 2.1 of the tutorial describes using import sys; sys.exit() if ^D
or ^Z doesn't work. However, both quit() and exit() work, as documented
in the "Built-in Constants" section of the Library documentation. Is
there something about them that should be hidden from the ordinary user
that they aren't used in place of the import sys; sys.exit()
combination? Seems easier to just say use "quit() or exit()", especially
for beginners following the tutorial who won't know what import or sys
are, or even the dot notation.
msg92810 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-09-18 07:19
They are meant for interactive use only.
msg92811 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-09-18 07:22
And fixed now (I used ``quit()``) in r74896.
History
Date User Action Args
2009-09-18 07:22:58georg.brandlsetresolution: works for me -> fixed
messages: + msg92811
2009-09-18 07:19:39georg.brandlsetstatus: open -> closed
resolution: works for me
messages: + msg92810
2009-09-17 23:38:01MLModelcreate