def __getitem__(self, index):
        """Retrieves a component, given its index.

        index -- 0, 1 or 2 for x, y or z

        """
        try:
            return self._v[index]
        except __HOLE__:
            raise IndexError("There are 3 values in this object, index should be 0, 1 or 2!")
dataset/ETHPy150Open PythonProgramming/Beginning-Game-Development-with-Python-and-Pygame/Chapter 10/gameobjects/vector3.py/Vector3.__getitem__