On Sat, Jun 29, 2013 at 9:36 AM, Ethan Furman <et...@stoneleaf.us> wrote:

> On 06/27/2013 03:49 PM, Steven D'Aprano wrote:
>
>>
>> Libraries should not call sys.exit, or raise SystemExit. Whether to quit
>> or not is not the library's decision to make, that decision belongs to
>> the application layer. Yes, the application could always catch
>> SystemExit, but it shouldn't have to.
>>
>
> So a library that is explicitly designed to make command-line scripts
> easier and friendlier should quit with a traceback?
>
> Really?
>

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)?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to