def __getitem__(self, index):
        """Gets a component as though the vector were a list."""
        try:
            return self._v[index]
        except __HOLE__:
            raise IndexError("There are 2 values in this object, index should be 0 or 1")
dataset/ETHPy150Open PythonProgramming/Beginning-Game-Development-with-Python-and-Pygame/gameobjects/vector2.py/Vector2.__getitem__