[Python-Dev] thoughts on having EOFError inherit from EnvironmentError?
Gregory P. Smith
greg at krypto.org
Sun Apr 13 00:01:32 CEST 2008
Basically as things are now EOFError is on its own but often wants to be
handled the same as other I/O errors that EnvironmentError currently covers.
Many uses of EOFError in our code base do not provide it any arguments so it
doesn't really fit the (errno, message [, filename]) tuple style that
EnvironmentError promises. But we could fudge that with a reasonable
default (whats reasonable?) if we rerooted this under EnvironmentError.
Alternatively the bug suggests a new parent exception for EnvironmentError
and EOFError both to inherit from.
Last time changing the heirarchy around this came up there was pushback
against adding yet another exception type so I'm thinking the simple
re-rooting may be the best answer if anything is done at all.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev