[Python-3000] Non-blocking I/O? (Draft PEP for New IO system) (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Mar 7 08:53:23 CET 2007


Adam Olsen wrote:

What's the rationale for IOError instead of ValueError? Isn't it an error in the application to apply the buffering layer to a non-blocking socket, and not something related to a connection reset?

Good point -- I often put a try-except for EnvironmentError around things to catch errors resulting from external conditions and report them to the user. So I'd prefer something that didn't descend from EnvironmentError for this.

TypeError might even be more appropriate than ValueError, since a non-blocking socket could be considered the wrong type of object to do buffered I/O on.

-- Greg



More information about the Python-3000 mailing list