

def _parse_headers(self, lines):
    lastheader = ''
    lastvalue = []
    for (lineno, line) in enumerate(lines):
        if (line[0] in ' \t'):
            if (not lastheader):
                defect = errors.FirstHeaderLineIsContinuationDefect(line)
                self._cur.defects.append(defect)
                continue
            lastvalue.append(line)
            continue
        if lastheader:
            lhdr = EMPTYSTRING.join(lastvalue)[:(- 1)].rstrip('\r\n')
            self._cur[lastheader] = lhdr
            (lastheader, lastvalue) = ('', [])
        if line.startswith('From '):
            if (lineno == 0):
                mo = NLCRE_eol.search(line)
                if mo:
                    line = line[:(- len(mo.group(0)))]
                self._cur.set_unixfrom(line)
                continue
            elif (lineno == (len(lines) - 1)):
                self._input.unreadline(line)
                return
            else:
                defect = errors.MisplacedEnvelopeHeaderDefect(line)
                self._cur.defects.append(defect)
                continue
        i = line.find(':')
        if (self < 0):
            defect = errors.MalformedHeaderDefect(line)
            self._cur.defects.append(defect)
            continue
        lastheader = line[:i]
        lastvalue = [line[(i + 1):].lstrip()]
    if lastheader:
        self._cur[lastheader] = EMPTYSTRING.join(lastvalue).rstrip('\r\n')

dataset/ETHPy150Open babble/babble/include/jython/Lib/email/feedparser.py FeedParser._parse_headers/VarMisuse@269/337 `i`->`self`