self pay pay def lastname(self)return self name split()[- def giveraise(selfpercent)self pay int(self pay ( percent)def __repr__(self)return '[person% % ](self nameself payclass manager(person)def __init__(selfnamepay)person __init__(selfname'mgr'paydef giveraise(selfpercentbonus )person giveraise(selfpercent bonusredefine constructor run original with 'mgrif __name__ ='__main__'bob person('bob smith'sue person('sue jones'job='dev'pay= print(bobprint(sueprint(bob lastname()sue lastname()sue giveraise print(suetom manager('tom jones' tom giveraise print(tom lastname()print(tomjob name not neededimplied/set by class againwe're using the same technique to augment the __init__ constructor here that we used for giveraise earlier--running the superclass version by calling through the class name directly and passing the self instance along explicitly although the constructor has strange namethe effect is identical because we need person' construction logic to run too (to initialize instance attributes)we really have to call it this wayotherwiseinstances would not have any attributes attached calling superclass constructors from redefinitions this way turns out to be very common coding pattern in python by itselfpython uses inheritance to look for and call only one __init__ method at construction time--the lowest one in the class tree if you need higher __init__ methods to be run at construction time (and you usually do)you must call them manuallyand usually through the superclass' name the upside to this is that you can be explicit about which argument to pass up to the superclass' constructor and can choose to not call it at allnot calling the superclass constructor allows you to replace its logic altogetherrather than augmenting it the output of this file' self-test code is the same as before--we haven' changed what it doeswe've simply restructured to get rid of some logical redundancy[personbob smith [personsue jones smith jones [personsue jones jones [persontom jones step customizing constructorstoo