

def _SetHeader(self, values):
    "Set the row's header from a list."
    if (self._values and (len(values) != len(self._values))):
        raise ValueError('Header values not equal to existing data width.')
    if (not self._values):
        for _ in xrange(len(values)):
            self._values.append(None)
    self._keys = list(values)
    self._BuildIndex()

dataset/ETHPy150Open google/textfsm/texttable.py Row._SetHeader/original