What is the __init__ method in Python?

preview_player
Показать описание
The ___init_‍__ method is used to initialize a class in Python. This initializer method accepts self (the class instance) along with any arguments the class accepts and then performs initialization steps.

00:00 A pointless Point class
00:40 The initializer method
02:01 Python calls _‍__init__‍_ whenever a class is called
02:48 Recap
Комментарии
Автор

extremely underrated channel. The explanations are straight to the point and simple enough that even my beginner monkey brain can understand.

deadspace