notes circular references involving objects with _del_ (method are not garbage-collected and are placed on the list gc garbage (uncollectable objectsthese objects are not collected due to difficulties related to object finalization the functions get_referrers(and get_referents(only apply to objects that support garbage collection in additionthese functions are only intended for debugging they should not be used for other purposes inspect the inspect module is used to gather information about live python objects such as attributesdocumentation stringssource codestack framesand so on cleandoc(doccleans up documentation string doc by changing all tabs into whitespace and removing indentation that might have been inserted to make the docstring line up with other statements inside function or method currentframe(returns the frame object corresponding to the caller' stack frame formatargspec(args [varags [varkw [defaults]]]produces nicely formatted string representing the values returned by getargspec(formatargvalues(args [varargs [varkw [locals]]]produces nicely formatted string representing the values returned by getargvalues(getargspec(funcgiven functionfuncreturns named tuple argspec(argsvarargsvarkwdefaultsargs is list of argument namesand varargs is the name of the argument (if anyvarkw is the name of the *argument (if any)and defaults is tuple of default argument values or none if there are no default argument values if there are default argument valuesthe defaults tuple represents the values of the last arguments in argswhere is the len(defaultsgetargvalues(framereturns the values of arguments supplied to function with execution frame frame returns tuple arginfo(argsvarargsvarkwlocalsargs is list of argument namesvarargs is the name of the argument (if any)and varkw is the name of the *argument (if anylocals is the local dictionary of the frame getclasstree(classes [unique]given list of related classesclassesthis function organizes the classes into hierarchy based on inheritance the hierarchy is represented as collection of nested listswhere each entry in the list is list of classes that inherit from the class that immediately precedes the list each entry in the list is -tuple (clsbases)where cls is the lib fl ff