What is the __init__ method in Python?

Опубликовано: 05 Сентябрь 2022
на канале: Python Morsels
2,269
73

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.

Read an article version of this video at https://pym.dev/what-is-init/

Find more Python screencasts at https://pym.dev/screencasts/

00:00 A pointless Point class
00:40 The initializer method
02:01 Python calls ‍__init__‍ whenever a class is called
02:48 Recap


На этой странице сайта вы можете посмотреть видео онлайн What is the __init__ method in Python? длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Python Morsels 05 Сентябрь 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 2,269 раз и оно понравилось 73 зрителям. Приятного просмотра!