'Get a slice or a particular index.'

def __getitem__(self, val):

    try:
        slice = self.redis.lrange(self.key, val.start, (val.stop - 1))
        return [self._unpack(i) for i in slice]
    except AttributeError:
        return self._unpack(self.redis.lindex(self.key, val))
    except Exception as e:
        log.error(('Get    item    failed    **    %s' % repr(e)))
        return None
