Nick Coghlan wrote: > Antoine Pitrou wrote: > >> This deserves its own PEP IMO, although I'm not sure it would be accepted >> (ISTR the idea of a detailed IO exception hierarchy was already refused >> in the past). >> > > Not as such - a big exception hierarchy rewrite was rejected, but > nothing specifically limited to the IO exceptions. > > Michael's response cut to the heart of the issue though - a richer IO > exception hierarchy can make life interesting for compatibility purposes > (especially when creating "file-like" interfaces to non-file objects). > Some of the error messages are truly awful though as things stand, especially for someone new to Python. Try to read from a file handle opened in read mode for example: IOError: [Errno 9] Bad file descriptor Michael > Cheers, > Nick. > > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog
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