

def __getitem__(self, column):
    'Support for [] notation.\n\n    Args:\n      column: Tuple of column names, or a (str) column name, or positional\n        column number, 0-indexed.\n\n    Returns:\n      A list or string with column value(s).\n\n    Raises:\n      IndexError: The given column(s) were not found.\n    '
    if isinstance(column, (list, tuple)):
        ret = []
        for col in column:
            ret.append(self[col])
        return ret
    try:
        return self._values[self._index[column]]
    except (KeyError, TypeError, ValueError):
        pass
    try:
        return self._values[column]
    except (IndexError, TypeError):
        pass
    raise IndexError(('No such column "%s" in row.' % column))

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