This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Yonatan Zunger, docs@python, terry.reedy
Date 2018-07-21.05:16:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1532150181.27.0.56676864532.issue34115@psf.upfronthosting.co.za>
In-reply-to
Content
There is an important difference between a program saying 'I am done executing' and a user saying 'I am done with the interactive session'.  This is especially true in an IDE where 'session' can include many editing and shell sessions.

'Stop executing'  happens when execution reaches the end of the file, which causes EOFError upon a read attempt.  It can also be done gracefully before the end of input with sys.exit(), which raises SystemExit.

In Interactive Python, 'leave session' can be done with SystemExit or the EOF control signal, which appears to raise EOFError.  This suggests that quit() and exit(), which were added because newbies did not know the proper way to exit, should raise EOFError rather than SystemExit.  The fact that 'quit' displays 'Use quit() or Ctrl-Z plus Return to exit' (EOF on Windows) suggests the same.  But I need to experiment (another day).
History
Date User Action Args
2018-07-21 05:16:21terry.reedysetrecipients: + terry.reedy, docs@python, Yonatan Zunger
2018-07-21 05:16:21terry.reedysetmessageid: <1532150181.27.0.56676864532.issue34115@psf.upfronthosting.co.za>
2018-07-21 05:16:21terry.reedylinkissue34115 messages
2018-07-21 05:16:21terry.reedycreate