(klass, a_list)
return result
Create a StackSummary object from a supplied list of
        FrameSummary objects or old-style list of tuples.
Create a StackSummary object from a supplied list of
        FrameSummary objects or old-style list of tuples.
Create a StackSummary object from a supplied list of FrameSummary objects or old - style list of tuples .
def from_list(klass, a_list):
        """
        Create a StackSummary object from a supplied list of
        FrameSummary objects or old-style list of tuples.
        """
        # While doing a fast-path check for isinstance(a_list, StackSummary) is
        # appealing, idlelib.run.cleanup_traceback and other similar code may
        # break this by making arbitrary frames plain tuples, so we need to
        # check on a frame by frame basis.
        result = StackSummary()
        for frame in a_list:
            if isinstance(frame, FrameSummary):
                result.append(frame)
            else:
                filename, lineno, name, line = frame
                result.append(FrameSummary(filename, lineno, name, line=line))
        return result
def from_list ( klass , a_list ) : # While doing a fast-path check for isinstance(a_list, StackSummary) is # appealing, idlelib.run.cleanup_traceback and other similar code may # break this by making arbitrary frames plain tuples, so we need to # check on a frame by frame basis. result = StackSummary ( ) for frame in a_list : if isinstance ( frame , FrameSummary ) : result . append ( frame ) else : filename , lineno , name , line = frame result . append ( FrameSummary ( filename , lineno , name , line = line ) ) return result