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 gvanrossum
Recipients cameron, docs@python, gvanrossum, iritkatriel, jack__d, lukasz.langa, maggyero, miss-islington, steven.daprano, terry.reedy
Date 2021-08-31.21:40:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630446003.16.0.860657123525.issue39452@roundup.psfhosted.org>
In-reply-to
Content
You're right, I'm being inconsistent. :-(  I withdraw my objection.

There are cases where sys.exit() is easier than returning an exit code, e.g. when the error is discovered deep inside some other code. But it's probably better to raise a dedicated exception in that case and catch it in main(), rather than just calling sys.exit() deep inside the other code. It's probably too fine a point for a tutorial. Sorry!
History
Date User Action Args
2021-08-31 21:40:03gvanrossumsetrecipients: + gvanrossum, terry.reedy, cameron, steven.daprano, docs@python, lukasz.langa, maggyero, miss-islington, iritkatriel, jack__d
2021-08-31 21:40:03gvanrossumsetmessageid: <1630446003.16.0.860657123525.issue39452@roundup.psfhosted.org>
2021-08-31 21:40:03gvanrossumlinkissue39452 messages
2021-08-31 21:40:03gvanrossumcreate