What is the __init__ method in Python?

Pubblicato il: 05 settembre 2022
sul canale di: 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


In questa pagina del sito puoi guardare il video online What is the __init__ method in Python? della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Python Morsels 05 settembre 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,269 volte e gli è piaciuto 73 spettatori. Buona visione!