customizes super' method by overriding and calling back to run the default provider implements the action method expected by super' delegate method study each of these subclasses to get feel for the various ways they customize their common superclass here' the fileclass superdef method(self)print('in super method'def delegate(self)self action(default behavior expected to be defined class inheritor(super)pass inherit method verbatim class replacer(super)def method(self)print('in replacer method'replace method completely class extender(super)extend method behavior def method(self)print('starting extender method'super method(selfprint('ending extender method'class provider(super)def action(self)print('in provider action'fill in required method if __name__ ='__main__'for klass in (inheritorreplacerextender)print('\nklass __name__ 'klass(method(print('\nprovider ' provider( delegate( few things are worth pointing out here firstnotice how the self-test code at the end of this example creates instances of three different classes in for loop because classes are objectsyou can store them in tuple and create instances generically with no extra syntax (more on this idea laterclasses also have the special __name__ attributelike modulesit' preset to string containing the name in the class header here' what happens when we run the filepython specialize py inheritor in super method replacer in replacer method class coding details