def frames_from_traceback(traceback):
    """
    Get iterable of frames in traceback.

    :param traceback: traceback to extract frames from
    :type traceback: traceback

    :returns: frames
    :rtype: iterable
    """

    frames = []
    curframe = traceback

    while curframe is not None:
        frames.append(curframe.tb_frame)
        curframe = curframe.tb_next

    return reversed(frames)