inspect — Inspect Live Objects — PyMOTW 3

The inspect module provides functions for learning about live objects, including modules, classes, instances, functions, and methods. The functions in this module can be used to retrieve the original source code for a function, look at the arguments to a method on the stack, and extract the sort of information useful for producing library documentation for source code.

Read more…

This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.