Python style: exceptions vs. sys.exit()
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Wed Sep 24 22:15:46 EDT 2008
On Wed, 24 Sep 2008 17:11:28 -0400, Ross Ridge wrote:
> Plenty of people were quick to say that the exception should be passed
> through to the caller. No one said this behaviour should be documented.
> There may be little practical difference bewteen calling sys.exit()
> after printing an error and progating an exception if no one using the
> library knows that it could generate that exception in those
> circumstances.
That's true, I didn't explicitly say that the library should be
documented. Nor did I say that it shouldn't be riddled with bugs. There's
little practical difference between a buggy library and one that raises
unexpected (i.e. undocumented) exceptions either.
--
Steven
More information about the Python-list
mailing list