def parse_http_list(s):
    res = []
    part = ''

    escape = quote = False
    for cur in s:
        if escape:
            part += cur
            escape = False
            continue
        if quote:
            if cur == '\\':
                escape = True
                continue
            elif cur == '"':
                quote = False
            part += cur
            continue

        if cur == ',':
            res.append(part)
            part = ''
            continue

        if cur == '"':
            quote = True

        part += cur

    # append last part
    if part:
        res.append(part)

    return [part.strip() for part in res]
Init hackathon factory
dataset/ETHPy150Open babble/babble/include/jython/Lib/urllib2.py/parse_http_list--crossover with--dataset/ETHPy150Open msopentechcn/open-hackathon/open-hackathon-server/src/hackathon/__init__.py/init_components