Which is called first when creating an instance: __new__ or __init__ in Python?
Correct answer
A. __new__
5 views
A. __new__
5 views
__new__ creates the instance and __init__ initialises it.
Asked in: Python Interview OOP
https://docs.python.org/3/tutorial/classes.htmlNot sure why the answer is A? Ask here and get an explanation.