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.) | greg.ewing at canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4