On Sep 23, 4:25 pm, Drake <[EMAIL PROTECTED]> wrote:
> The
> question is: should the library function be able to just dump to
> sys.exit() with a message about the error (like "couldn't open this
> file"),

I'm kind of curious what your library is for.  Is it something where
exiting the app be the only appropriate action for an IO error?

Even if it is, I will echo other people's advice: a library should
never call exit, at least not by default.  For your imagined use it
might make sense to exit upon any failure, but other people using the
library might not want to do that.

For that matter, a library should never print error or status
messages.  Messages should either be sent to the caller somehow, or
handled using the logging facility.


Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to