I have a query in class based OOP paradigm aspect of imperative/dynamic python language. Below is the diagram for a class hierarchy in python taken from link.
As per the diagram, I understand that, Every datatype in python is a class. bool
class is direct child of object
class. When we create a new user-defined class(Natalie
) then object
class will be an ultimate ancestor for this class. class objects(int
/str
/object
) themselves are instances of type
class. In java world we call it as 'Class' class instead of type
class.
My question is:
1) Is my understanding correct?
2)
If yes, Am confused with the arrow direction from type
to object
class. How do i understand this?
3) I could not understand/visualise these two phrases(in brown), Please help me on this.
the object class is an instance of the type class and itself
the type class is an instance of the object class and itself