Python super. How does it work?

Pubblicato il: 10 febbraio 2023
sul canale di: Python for Everyone
1,389
55

Super allows you to call methods from base classes that are overridden in subclasses. But how does it work? And what does it look like? In this video you see an inheritance example and inspect super. You learn that super is not a function but a class that it allows you to override base class methods.

C H A P T E R S
0:24 Typical single inheritance example
0:47 Overriding _init_ in the subclass
1:01 Preventing duplicate code with super
2:05 super is not a function but a class
2:28 Using super in the subclass
3:49 super gives access to the base class initializer that was overridden in the subclass

M Y O N L I N E T R A I N I N G
🎓Like my style of teaching? Try free chapters of my online courses: https://pythonforeveryone.com

L I N K S I N T H E V I D E O
Python website: https://www.python.org/

#pythonforeveryone #programming #python


In questa pagina del sito puoi guardare il video online Python super. How does it work? della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Python for Everyone 10 febbraio 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,389 volte e gli è piaciuto 55 spettatori. Buona visione!