

def parse_string(self, string):
    'Parses a string as returned by the EHLO command and adds all\n        discovered extensions. This string should *not* have the response code\n        prefixed to its lines.\n\n        :param string: The string to parse.\n        :returns: The first line of the string, which will be a free-form\n                  message response to the EHLO command.\n\n        '
    header = None
    string += '\r\n'
    for match in line_pattern.finditer(string):
        if (not header):
            header = match.group(1)
        else:
            ext_match = parse_pattern.match(match.group(1))
            if ext_match:
                name = ext_match.group(1)
                arg = match.group(2)
                if arg:
                    self.add(name, arg)
                else:
                    self.add(name)
    return (header or string.rstrip('\r\n'))

dataset/ETHPy150Open slimta/python-slimta/slimta/smtp/extensions.py Extensions.parse_string/VarMisuse@86/236 `ext_match`->`match`