If it's only going to be used in your application, and if you're going to create a Coord3D
instance with the values anyway, I'd just return a Coord3D
instance to save you the effort. If, however, you have any interest in making this portable/general, return a tuple. It'll be easy to create a Coord3D
anyway, using
c3d = Coord3D(*getCoordinate(index))
(assuming your constructor is Coord3D.__init__(self, x, y, z)
)