On 2008-09-23, Drake <[EMAIL PROTECTED]> wrote: > My group is developing a medium-sized library of general-purpose > Python functions, some of which do I/O. Therefore it is possible for > many of the library functions to raise IOError Exceptions. 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"),
No. A library module should never call sys.exit(). > or should the exception propagate to the calling program which > handles the issue? Yes. Let the application handle the error if it wants to. If it's not handled, it'll end up causing the program to exit. -- Grant Edwards grante Yow! It's a hole all the at way to downtown Burbank! visi.com -- http://mail.python.org/mailman/listinfo/python-list