(tb)
Clear all references to local variables in the frames of a traceback.
Clear all references to local variables in the frames of a traceback.
Clear all references to local variables in the frames of a traceback .
def clear_frames(tb):
    "Clear all references to local variables in the frames of a traceback."
    while tb is not None:
        try:
            tb.tb_frame.clear()
        except RuntimeError:
            # Ignore the exception raised if the frame is still executing.
            pass
        tb = tb.tb_next
def clear_frames ( tb ) : while tb is not None : try : tb . tb_frame . clear ( ) except RuntimeError : # Ignore the exception raised if the frame is still executing. pass tb = tb . tb_next