[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 09:56:17 CET 2007


Daniel Stutzbach wrote:

An IOError makes it more clear that something went awry, while a ValueError typically implies that the operation was rejected altogether.

In the code I typically write, the IOError will get reported to the user, who won't know why it happened or what to do about it, and the application will abort that operation and go on to do something else.

The ValueError will cause the application to abort altogether and produce a traceback, which is as it should be, since there's a bug.

In either case, it doesn't really matter whether something was written or not, as the whole operation is screwed anyway.

-- Greg



More information about the Python-3000 mailing list