Identifying exceptions that can be raised

Brian van den Broek bvande at po-box.mcgill.ca
Thu Nov 18 23:16:30 EST 2004


dkcpub said unto the world upon 2004-11-18 22:38:
> I'm very new to Python, but I couldn't find anything in the docs or faq 
> about this.  And I fished around in the IDLE menus but didn't see anything.
> 
> Is there a tool that can determine all the exceptions that can be raised 
> in a Python function, or in any of the functions it calls, etc.?
> 
> /Dan

Hi Dan,

Do you mean all the exceptions that exist? If so, while I don't know 
Python well enough to vouch for its completeness, check out 
<http://www.python.org/doc/2.3.4/lib/module-exceptions.html>.

If you mean you want a list of exceptions that a given function could 
raise, well, never mind :-)

Best,

Brian vdB




More information about the Python-list mailing list