Guido van Rossum <gu...@python.org> added the comment:

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!

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39452>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to