Jim Jewett wrote: > In particular, should socket.error, ftp.Error and > httplib.HTTPException (used in Py3K) inherit from IOError?
I'd say that if they incorporate a C library result code they should inherit from IOError, or if they incorporate a system call result code they should inherit from OSError. Otherwise they should inherit from EnvironmentError. I don't think there's any point in simply catching one of these and re-wrapping it in the library's own exeption class, but if such wrapping is done, it should inherit from EnvironmentError as well. It's convenient to be able to catch EnvironmentError and get anything that is caused by circumstances outside the program's control. -- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | Carpe post meridiem! | Christchurch, New Zealand | (I'm not a morning person.) | [EMAIL PROTECTED] +--------------------------------------+ _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com