I was bit confused on what is a constructor in python actually. Is className()
is constructor or __init__()
is a constructor or __new__()
a constructor or all these comes under constructor ??
Somewhere i read “In Python, when you call a class , you’re calling the class constructor, which creates, initializes, and returns a new object by triggering Python’s internal instantiation process.” Now i cant understand what should i call a constructor , is it a single method or group of methods like __new__()
and __init__()
?
5