What is the __init__ method in Python?

Publié le: 05 septembre 2022
sur la chaîne: 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


Sur cette page du site, vous pouvez voir la vidéo en ligne What is the __init__ method in Python? durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Python Morsels 05 septembre 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,269 fois et il a aimé 73 téléspectateurs. Bon visionnage!