Is there any way to programmatically determine which exceptions an object or method might raise?
Like dir(obj) lists available methods, I'm looking for the equivalent dir_exceptions(obj).
As far as I know, the only way to achieve this would be to parse the source.