def __getitem__(self, key):
        if isinstance(key, basestring):
            # return all of the values for the given name
            try:
                idx = self._names.index(key)
            except ValueError:
                raise KeyError("CaseSet has no input or outputs named %s" % key)
            return [lst[idx] for lst in self._values]
        else:  # key is the case number
            return self._case_from_values(self._values[key])
If key is a varname or expression, returns a list of all of the
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/casehandlers/caseset.py/CaseArray.__getitem__