ietfparse/headers.py
def parse_list(value):
    """
    Parse a comma-separated list header.

    :param str value: header value to split into elements
    :return: list of header elements as strings

    """
    segments = _QUOTED_SEGMENT_RE.findall(value)
    for segment in segments:
        left, match, right = value.partition(segment)
        value = ''.join([left, match.replace(',', '\000'), right])
    return [_dequote(x.strip()).replace('\000', ',')
            for x in value.split(',')]
def parse_list(value):
    """
    Parse a comma-separated list header.

    :param str value: header value to split into elements
    :return: list of header elements as strings

    """
    segments = _QUOTED_SEGMENT_RE.findall(value)
    for segment in segments:
        left, match, right = value.partition(segment)
        value = ''.join([left, match.replace(',', '\000'), right])
    return [_dequote(x.strip()).replace('\000', ',')
            for x in value.split(',')]
Parse a comma-separated list header.

    :param str value: header value to split into elements
    :return: list of header elements as strings