February 2006
Intermediate to advanced
648 pages
14h 53m
English
The inspect module is used to gather information about live Python objects such as attributes, documentation strings, source code, and so on.
currentframe()Returns the frame object corresponding to the caller’s stack frame.
formatargspec(args [, varags [, varkw [, defaults]]])Produces a nicely formatted string representing the values returned by getargspec().
formatargvalues(args [, varargs [, varkw [, locals]]])Produces a nicely formatted string representing the values returned by getargvalues().
getargspec(func)Given a function, func, returns a tuple (args, varargs, varkw, defaults). args is a list of argument names, varargs is the name of the * argument (if any). varkw is the name of the ** argument (if any), and defaults is a ...
Read now
Unlock full access