Question about is-a, has-a relation(python3)

Is my understanding correct?

is-a relation is between class and object(instance), or
class with less specific attributes and class with more specifc attributes.
So “object is-a class is-a class”?

Yes, I believe that’s right but, you have to be concrete about this to get it right. One problem OOP has is it promotes “abstract meta meta” thinking, or that’s the best name I have for it. That’s where, instead of saying:

joe is-a Person is-a Animal

Which you can model with real code like this:


class Animal(object): pass

class Person(Animal): pass

joe = Person()

That’s concrete, and you can talk about that. But “object is-a class is-a class” is confusing because it’s vague and abstract.

1 Like