Python super()

0
7K

super() lets you avoid referring to the base class explicitly, which can be nice. But the main advantage comes with multiple inheritance, where all sorts of fun stuff can happen. Note that the syntax changed in Python 3.0: you can just say super().__init__() instead of super(ChildB, self).__init__() which IMO is quite a bit nicer.

Căutare
Categorii
Citeste mai mult
Social Issues
Pulp Fiction. (1994)
The lives of two mob hitmen, a boxer, a gangster and his wife, and a pair of diner bandits...
By Leonard Pokrovski 2022-11-06 21:24:39 0 18K
Business
Aristotle is the most influential person in philosophy.
Aristotle is the most influential person in philosophy. Aristotle is the most influential...
By Leonard Pokrovski 2024-07-24 12:42:33 0 11K
Law
The Interplay of Society and Law: Navigating the Complex Dynamics
In the intricate dance between society and law, each step influences the other, shaping the...
By Dacey Rankins 2024-06-10 19:55:49 0 10K
Shopping
The Evolution of Shopping: From Brick-and-Mortar to Click-and-Order
The Evolution of Shopping: From Brick-and-Mortar to Click-and-Order Shopping, once a simple...
By Leonard Pokrovski 2024-05-27 22:19:40 0 12K
Science Fiction and Fantasy
The Terminator. (1984)
A human soldier is sent from 2029 to 1984 to stop an almost indestructible cyborg killing...
By Leonard Pokrovski 2023-04-28 19:18:14 0 21K
image/svg+xml


BigMoney.VIP Powered by Hosting Pokrov