On Mar 6, 6:23 pm, [EMAIL PROTECTED] wrote: > I dont want to expose the above Point3D implementation to the user / > client side.To achieve that we can use interface concept.In Python to > use interface concept.
In python you would use name mangling to hide parts of the interface from the public. class Point3D: def __init__(self): self.__x = 0.0 self.__y = 0.0 self.__z = 0.0 def __setPoint(x,y,z): self.__x = x self.__y = y self.__z = z def __getPoint(x,y,z): x = self.__x y = self.__y z = self.__z p = Point3D() p.__setPoint(1,2,3) # ... # AttributeError: Point3D instance has no attribute '__setPoint' Regards, Jordan -- http://mail.python.org/mailman/listinfo/python-list