operation class method strobj __str__self lenobj __len__self item in obj __contains__selfitem obj[ndx__getitem__selfndx obj[ndxvalue __setitem__selfndxvalue obj =rhs __eq__selfrhs obj rhs __lt__selfrhs obj <rhs __le__selfrhs obj !rhs __ne__selfrhs obj rhs __gt__selfrhs obj >rhs __ge__selfrhs obj rhs __add__selfrhs obj rhs __sub__selfrhs obj rhs __mul__selfrhs obj rhs __truediv__selfrhs obj /rhs __floordiv__selfrhs obj rhs __mod__selfrhs obj *rhs __pow__selfrhs obj +rhs __iadd__selfrhs obj -rhs __isub__selfrhs obj *rhs __imul__selfrhs obj /rhs __itruediv__selfrhs obj //rhs __ifloordiv__selfrhs obj %rhs __imod__selfrhs obj **rhs __ipow__selfrhs table methods for overloading the common python operators now we can convert point object to string or use the object directly within the print(function just as we would with an int or float objectmsg "the initial point is str(pointaprint"point "pointb the str method is automatically called when you attempt to print an object or convert the object to string if the str method is not overloaded by userdefined classthe default action is to print the object type and its reference address finallysuppose we also want to allow the subtraction operator to be used in computing the distance between two points we can define the sub special