I'm digging around with some overriding of exception stuff in a project at work. And I'm having just the hardest time looking up what all the default methods and variables are inside the standard built in "Class Exception" in python. I've found just about every tutorial on the planet, and I've found python's docs about baseexception class, but I want to view the original class. inspect.getsource() does not work with built in classes, and about 45 minutes of google searching has not yielded any results. I know you can view the entire source code of python on github, but I legitimately would not know where to begin looking with the behemoth of directories there and search is proving useless.
can I get a hand?
I just want to view:
Class Exception() "..."
CodePudding user response:
I think this is it: https://github.com/python/cpython/blob/main/Objects/exceptions.c
It is in C.