How to determine what exceptions a method might raise?

Ed Jensen ejensen at visi.com
Tue Jan 16 14:18:42 EST 2007


I'm really enjoying using the Python interactive interpreter to learn
more about the language.  It's fantastic you can get method help right
in there as well.  It saves a lot of time.

With that in mind, is there an easy way in the interactive interpreter
to determine which exceptions a method might raise?  For example, it
would be handy if there was something I could do in the interactive
interpreter to make it tell me what exceptions the file method might
raise (such as IOError).

Thanks in advance.



More information about the Python-list mailing list