"George Sakkis" <[EMAIL PROTECTED]> wrote:
> As for the OP's question, since file is a fixed builtin, I think it
> should be possible to know all the possible exceptions that can be
> raised; I'm not sure if it's clearly documented though.
Just calling 'file' the most obvious exceptions it can raise are:
IOError
MemoryError
ValueError
I'm not sure if it can return UnicodeDecodeError, it looks as though it may
be possible on windows, but I couldn't trigger it.
Assigning the result to a variable can of course raise absolutely any
exception. That's the main problem: just because a C function raises only a
few different exceptions doesn't mean that the line of code calling it
cannot generate a host more.
--
http://mail.python.org/mailman/listinfo/python-list