I guess it would be easy for me to explain the question with an examply Suppose I want to write my own vector class. And in that class let say i want to define a method to add 2 vectors something like:
class vector:
.....
def add(self,other):
----some code
so basically what this will do is.. if a vector is vec then
vec.add(othervec)
will do the addition.. but how do i do this.. its like inherting your own class..datatype ? Thanks