Python: __init__ is NOT a constructor: a deep dive in Python object creation

Tinkering with Python’s constructor to create fast, memory-efficient classes

Mike Huls
Towards Data Science
9 min readNov 27, 2023

--

How Python builds objects (image by ChatGPT)

Did you know that the __init__ method is not a constructor? But if __init__ doesn’t create the object, then what does? How do objects get created in Python? Does Python even have a constructor?

--

--