Details on exceptions

Derek Fountain nomail at hursley.ibm.com
Thu Nov 20 21:48:21 EST 2003


> Library Reference, Built-in Exceptions will tell you
> everything you want to know.

Ah ha! Yes, it did, thanks. The business of learning Python seems to revolve
around learning where, in all the documentation, the thing you're looking
for is written.

Here's an example: in that page it says: "When exceptions of this type are
created with a 2-tuple...". Er, what does that mean? I found an example
which does this:

except IOError, (errno, strerror):

which is presumably the syntax referred to. Where, in the docs or the
O'Reilly book, can I find a description of this syntax? Can I instantiate
any class in that manner, or is it somehow specific to the exception
handling in some way?




More information about the Python-list mailing list