Loading topic
self. You should also be comfortable with f-strings and print.2 min readself, and write functions with arguments. It also assumes you know what a subclass is and that Python looks for a method on the instance's class first, then on its parents.3 min readself, and have already seen a subclass override a parent method. Here you will learn how to extend a parent method instead of replacing it.3 min read__init__ with self, and have read the earlier chapters on subclasses and method overriding. Here you will see why a subclass constructor has to call its parent's constructor, and how to do it correctly.2 min readprint and f-strings. Here you learn how to ask Python whether an object or a class belongs to an inheritance family, and which of the two ways of che3 min readself, override a method in a subclass, and use isinstance(). Earlier chapters covered those topics.2 min readself, write subclasses that override methods, and call super(). It also assumes you have seen polymorphism, where one call works on many related types.2 min readsuper(). It also assumes you know that Python looks up a method on the instance's class and then on its parents. Here you will learn the exact order of that search and how to read it.2 min readsuper(). You should also know that Python looks up methods through a class's method resolution order (MRO).3 min readsuper() works, how Python builds the method resolution order (MRO), and how multiple inheritance behaves in a diamond. It builds on all three.2 min readself, call super() in a subclass, and understand polymorphism. It covers how to override a method so that code written for the parent class keeps working with the subclass.3 min readsuper(), and read a basic method resolution order. It covers when inheritance is the wrong tool and what to use instead.3 min read