I don't really understand what Zed means in ex42 about has-a

First, I do understand is-a relation, which is between class and class or class with object/instance.
But I don’t understand has-a. I thought has-a works for attribute and class or attribute and object.
But in ex42 of Learn Python the Hard Way. Zed said: “You use has-a when you talk about objects
and classes that are related only because they reference to each other”. What does that mean?

Let me simplify this:
Is has-a relation between class and its attribute or
an object and its attribute. Like, “Salmon has-a mouth”
“Alice(Salmon) has-a mouth”

One big problem with object-oriented programming is that people overthink it. If I put this into code it is simply this:

x.mouth = “Wide”

it’s literally just attributes you have on the object. The importance of thinking about it with these two terms though is to understand the difference between inheriting a trait from your parent versus having the trait as an attribute or a piece of data on an object. Many times what happens is people will use inheritance to pass attributes down to children when really those attributes should just be plain old data and there is no difference between all of the children.

A really good example is someone once showed me a game where they had classes for every kind of soldier. They had used inheritance in different classes to set values for each attribute. The problem with this is that all of the soldiers were basically the same they just had ( as in has) different things like a different type of rifle or a different type of tank or a different type of armor and so on. In that case having inheritance is pointless instead this these should all have just been data.

So the way to think about the relationships are if you can configure it with data to make different types of objects then there is no point in having a class structure do it. You’ll find that most of the time you don’t even need class structures to create new objects that are different.