How is __init__ not a constructor? Isn't it working exactly like a constructor?

Can I get a bit more clarification on init?

Hey @Nitin-Bhattacharyya-2319140631658033, “ init ” is a reseved method in python classes. It is called as a constructor in object oriented terminology. This method is called when an object is created from a class and it allows the class to initialize the attributes of the class. For more information/clarification, you can refer the following link :

init method in python

I hope this clears your doubt ! :+1:
Happy Learning ! :smile:

Thanks for the response , after some intensive digging I found that there is a difference in constructors and initialises,which don’t differ in C++ or Java but that in python new is a constructor and init is an initialiser,don’t know how wrong or right I am but I hope I will learn more and the concepts will be clearer to me as I dive in more in the course.

Thanks for the response , after some intensive digging I found that there is a difference in constructors and initialises,which don’t differ in C++ or Java but that in python new is a constructor and init is an initialiser,don’t know how wrong or right I am but I hope I will learn more and the concepts will be clearer to me as I dive in more in the course.

Yeah right ! Here is all the explanation you need :

init in python

I hope this makes it more clear.
Happy Learning ! :slightly_smiling_face:

Thanks for the response,my doubt is resolved now.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.