def __getitem__(self, val):
        if isinstance(val, int):
            return self.events[val]
        elif isinstance(val, slice):
            return History(events=self.events[val])

        raise TypeError("Unknown slice format: %s" % type(val))