<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Jun 29, 2013 at 9:36 AM, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 06/27/2013 03:49 PM, Steven D'Aprano wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Libraries should not call sys.exit, or raise SystemExit. Whether to quit<br>
or not is not the library's decision to make, that decision belongs to<br>
the application layer. Yes, the application could always catch<br>
SystemExit, but it shouldn't have to.<br>
</blockquote>
<br></div>
So a library that is explicitly designed to make command-line scripts easier and friendlier should quit with a traceback?<br>
<br>
Really?<br></blockquote></div><br>Perhaps put the functionality "handling of the exception of library to sys.exit with a message" into a method so that the user can override it (e.g., so that it just throw the same exception to the caller of the library)?<br>
</div></div>