def __getitem__(self, kper):
    try:
        kper = int(kper)
    except Exception as e:
        raise Exception(('MfList error: _getitem__() passed invalid kper index:' + str(kper)))
    if (kper not in list(self.data.keys())):
        if (kper == 0):
            return self.get_empty()
        else:
            return self.data[self.__find_last_kper(kper)]
    if (self.vtype[kper] == int):
        if (self.data[kper] == 0):
            return self.get_empty()
        else:
            return self.data[self.__find_last_kper(kper)]
    if (self.vtype[kper] == str):
        return self.__fromfile(self.data[kper])
    if (self.vtype[kper] == np.recarray):
        return self.data[kper]
def __getitem__(self, kper):
    try:
        kper = int(kper)
    except Exception as e:
        raise Exception(('MfList error: _getitem__() passed invalid kper index:' + str(kper)))
    if (kper not in list(self.data.keys())):
        if (kper == 0):
            return self.get_empty()
        else:
            return self.data[self.__find_last_kper(kper)]
    if (self.vtype[kper] == int):
        if (self.data[kper] == 0):
            return self.get_empty()
        else:
            return self.data[self.__find_last_kper(kper)]
    if (self.vtype[kper] == str):
        return self.__fromfile(self.data[kper])
    if (self.vtype[kper] == np.recarray):
        return self.data[kper]