

def __call__(self, string):
    "Parse `string` and return `self.key_value_class()` instance.\n\n        The best of `self.separators` is determined (first found, longest).\n        Back slash escaped characters aren't considered as separators\n        (or parts thereof). Literal back slash characters have to be escaped\n        as well (r'\\').\n\n        "

    class Escaped(str):
        'Represents an escaped character.'

    def tokenize(s):
        "Tokenize `s`. There are only two token types - strings\n            and escaped characters:\n\n            tokenize(r'foo\\=bar\\baz')\n            => ['foo', Escaped('='), 'bar', Escaped('\\'), 'baz']\n\n            "
        tokens = ['']
        esc = False
        for c in s:
            if esc:
                tokens.extend([Escaped(c), ''])
                esc = False
            elif (c == '\\'):
                esc = True
            else:
                tokens[(- 1)] += c
        return tokens
    tokens = tokenize(string)
    separators = sorted(self.separators, key=len)
    for (i, token) in enumerate(tokens):
        if isinstance(token, Escaped):
            continue
        found = {
            
        }
        for sep in separators:
            pos = token.find(sep)
            if (pos != (- 1)):
                found[pos] = sep
        if found:
            sep = found[min(found.keys())]
            (key, value) = token.split(sep, 1)
            key = (''.join(tokens[:i]) + key)
            value += ''.join(tokens[(i + 1):])
            break
    else:
        raise ArgumentTypeError(('"%s" is not a valid value' % string))
    return self.key_value_class(key=tokens, value=value, sep=sep, orig=string)

dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/httpie/input.py KeyValueArgType.__call__/VarMisuse@297/539 `key`->`tokens`