Hi all,
I am reading ex42. Before this ex 42. I was thinking of defining a class as below
class Animal(object):
pass
Animal
is the class name. And when you say cat=Animal()
, you define an object cat using the class Animal.
But ex42 told me that
You use the phrase is-a when you talk about objects and classes being related to each other by a class relationship.
and
## Animal is-a object (yes, sort of confusing) look at the extra credit
class Animal(object):
pass
Here, animal seems a less abstract concept and object is the more abstract one. If I understand correctly, class is an abstraction of a type of objects. However, this is not consistent with the book.
Maybe I get things wrong. Can someone help to clarify? Thank you!