Created
August 6, 2019 23:44
-
-
Save IdlePhysicist/9dc911436e9e4ed489d8e3a25768af0a to your computer and use it in GitHub Desktop.
Find out what exceptions are defined in a module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Where sqlite3 is the place holder for the module that you want to find the exceptions for. | |
import sqlite3, inspect | |
print( [name for name, value in vars(sqlite3).items() if inspect.isclass(value) and issubclass(value, Exception)] ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment