Python OOP For Beginners - Inheritance Explained

preview_player
Показать описание
00:00 - Start
00:01 - Why Inheritance is so useful
01:18 - Creating a child class
01:48 - Using 'super' to run the parent classes constructor
02:59 - Setting up a child classes attributes
06:28 - Making a second subclass (child class)
07:13 - Using an object's method to interact with another object's attributes
10:21 - Using inherited methods in a child object
Рекомендации по теме
Комментарии
Автор

Nice, but is the usage of super for the Villain class correct as you are already inheriting dunder init from Character in this case (with no changes)?

derekreed
visit shbcf.ru