parameters: (cls, return_value)
docstring: Handles tracing of return values
docstring_summary: Handles tracing of return values
docstring_tokens: Handles tracing of return values
function: def tracereturn(cls, return_value):
          """Handles tracing of return values
          """
          if not cls.trace_active:
              return
  
          # Get caller's frame
          frameobj, filename, lineno, function, code_context, index = inspect.stack(context=0)[1]
  
          args, varargs, varkw, locals_dict = inspect.getargvalues(frameobj)
  
          try:
              ##frame_info = (filename, lineno, function, code_context)
  
              # Copy locals_dict (just to be safe in avoiding cyclic references)
              locals_dict = locals_dict.copy()
  
              if "self" in locals_dict:
                  try:
                      # Attach a string representation of local variables to self object of returning function
                      setattr(locals_dict["self"], "_trace_"+function+"_locals", str(locals_dict))
                  except Exception:
                      pass
  
              return return_value
          finally:
              # Clean up to avoid cyclic references to objects in frame
              del frameobj, args, varargs, varkw, locals_dict
function_tokens: def tracereturn ( cls , return_value ) : if not cls . trace_active : return # Get caller's frame frameobj , filename , lineno , function , code_context , index = inspect . stack ( context = 0 ) [ 1 ] args , varargs , varkw , locals_dict = inspect . getargvalues ( frameobj ) try : ##frame_info = (filename, lineno, function, code_context) # Copy locals_dict (just to be safe in avoiding cyclic references) locals_dict = locals_dict . copy ( ) if "self" in locals_dict : try : # Attach a string representation of local variables to self object of returning function setattr ( locals_dict [ "self" ] , "_trace_" + function + "_locals" , str ( locals_dict ) ) except Exception : pass return return_value finally : # Clean up to avoid cyclic references to objects in frame del frameobj , args , varargs , varkw , locals_dict