filmov
tv
What is the __init__ method in Python?

Показать описание
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
00:00 A pointless Point class
00:40 The initializer method
02:01 Python calls ___init___ whenever a class is called
02:48 Recap
Комментарии