Last answered:

23 Jan 2023

Posted on:

22 Jan 2023

0

Kindly explain why we put Object in the bracket

can someone kindly explain the function of the word object in the bracket here > and an instance where if we dont put in Object what happens?

class  BankAccount(Object):

as seen in the lecture video

inplace of object can we use another word?

1 answers ( 0 marked as helpful)
Instructor
Posted on:

23 Jan 2023

0

Hey Chukwunonso,

Thank you for reaching out!

In the Inheritance lecture, Giles mentions that 'object is a built-in class template from which all other classes inherit'. Therefore, the Patient class inherits everything from the built-in object class. As written in Python's documentation, object() returns a new featureless object. An instance of such a featureless object is created below:
image.png

Hope this helps!

Kind regards,
365 Hristina

Submit an answer