What does it mean to inherit from the object class?


What does it mean to inherit from the object class?


In Python, the object class gives any class you make the core behaviors you’d want from any object, regardless of what you add onto it. Examples include parent-child relationships between objects, specifying how to initialize your object, and class descriptions.
For a much better response than I could give, take a look at this StackOverflow top answer on why object is inherited and what it does.
And don’t worry, this is not at all required to be understood to know how to use and create classes and objects!



I am trying to solve the exercise, but I am having a hard time trying to understand where is the class’ body. Is it where the “class magic” is going to happen? I have been trying to place the “pass” keyword in different places, but all of them gives an error

Just like if you were to define a function with “def function_name():”, “class Class():” works the same way. Make sure you have the colon, and then add the block of text under it (make sure it is indented). Place the “pass” inside of the “class…” you just made.


the class’ body is located below # Class magic here