Apologies if this doesn\'t make sense, i\'m not much of an experienced programmer.
Consider the following code:
import mymodule
class MyClass:
Allow me to propose a different example.
Imagine to have the class Vector. Now you want a class Point. Point can be defined with a vector but maybe it has other extra functionalities that Vector doesn't have. In this case you derive Point from Vector.
Now you need a Line class. A Line is not a specialisation of any of the above classes so probably you don't want to derive it from any of them. However Line uses points. In this case you might want to start you Line class this way:
class Line(object):
def __init__(self):
self.point1 = Point()
self.point2 = Point()
Where point will be something like this:
class Point(Vector):
def __init__(self):
Vector.__init__(self)
So the answer is really: Depends what you need to do, but when you have a clear idea of what you are coding, than choosing between sub-classing or not becomes obvious.
I hope it helped.