(lines, fmt, data_process_func=None)
return overview
Parse the response to a OVER or XOVER command according to the
    overview format `fmt`.
Parse the response to a OVER or XOVER command according to the
    overview format `fmt`.
Parse the response to a OVER or XOVER command according to the overview format fmt .
def _parse_overview(lines, fmt, data_process_func=None):
    """Parse the response to a OVER or XOVER command according to the
    overview format `fmt`."""
    n_defaults = len(_DEFAULT_OVERVIEW_FMT)
    overview = []
    for line in lines:
        fields = {}
        article_number, *tokens = line.split('\t')
        article_number = int(article_number)
        for i, token in enumerate(tokens):
            if i >= len(fmt):
                # XXX should we raise an error? Some servers might not
                # support LIST OVERVIEW.FMT and still return additional
                # headers.
                continue
            field_name = fmt[i]
            is_metadata = field_name.startswith(':')
            if i >= n_defaults and not is_metadata:
                # Non-default header names are included in full in the response
                # (unless the field is totally empty)
                h = field_name + ": "
                if token and token[:len(h)].lower() != h:
                    raise NNTPDataError("OVER/XOVER response doesn't include "
                                        "names of additional headers")
                token = token[len(h):] if token else None
            fields[fmt[i]] = token
        overview.append((article_number, fields))
    return overview
def _parse_overview ( lines , fmt , data_process_func = None ) : n_defaults = len ( _DEFAULT_OVERVIEW_FMT ) overview = [ ] for line in lines : fields = { } article_number , * tokens = line . split ( '\t' ) article_number = int ( article_number ) for i , token in enumerate ( tokens ) : if i >= len ( fmt ) : # XXX should we raise an error? Some servers might not # support LIST OVERVIEW.FMT and still return additional # headers. continue field_name = fmt [ i ] is_metadata = field_name . startswith ( ':' ) if i >= n_defaults and not is_metadata : # Non-default header names are included in full in the response # (unless the field is totally empty) h = field_name + ": " if token and token [ : len ( h ) ] . lower ( ) != h : raise NNTPDataError ( "OVER/XOVER response doesn't include " "names of additional headers" ) token = token [ len ( h ) : ] if token else None fields [ fmt [ i ] ] = token overview . append ( ( article_number , fields ) ) return overview