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.
Pesquisar
Chart
Categorias
- Arts
- Business
- Computers
- Jogos
- Health
- Início
- Kids and Teens
- News
- Recreation
- Reference
- Regional
- Science
- Shopping
- Society
- Sports
- Бизнес
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Leia mais
Why Global Supply Chains May Never Be the Same. (2022)
Every day, millions of sailors, truck drivers, longshoremen, warehouse workers and delivery...
Crescendo (2020)
An outwardly ambitious and charismatic opera singer fights to maintain her stature while silently...
Храброе сердце. Braveheart. (1995)
Действие фильма начинается в 1280 году в Шотландии. Это история легендарного национального героя...
Psychosis: Alcohol
Approximately three percent of people with alcoholism experience psychosis during acute...
Python __init__ Method
The __init__ method is the Python equivalent of the C++ constructor in an...