eraise operation without subclassingbut none of the other options yield code as optimal as oursalthough we could have simply coded manager from scratch as newindependent codewe would have had to reimplement all the behaviors in person that are the same for managers although we could have simply changed the existing person class in place for the requirements of manager' giveraisedoing so would probably break the places where we still need the original person behavior although we could have simply copied the person class in its entiretyrenamed the copy to managerand changed its giveraisedoing so would introduce code redundancy that would double our work in the future--changes made to person in the future would not be picked up automaticallybut would have to be manually propagated to manager' code as usualthe cut-and-paste approach may seem quick nowbut it doubles your work in the future the customizable hierarchies we can build with classes provide much better solution for software that will evolve over time no other tools in python support this development mode because we can tailor and extend our prior work by coding new subclasseswe can leverage what we've already donerather than starting from scratch each timebreaking what already worksor introducing multiple copies of code that may all have to be updated in the future when done rightoop is powerful programmer' ally step customizing constructorstoo our code works as it isbut if you study the current version closelyyou may be struck by something bit odd--it seems pointless to have to provide mgr job name for manager objects when we create themthis is already implied by the class itself it would be better if we could somehow fill in this value automatically when manager is made the trick we need to improve on this turns out to be the same as the one we employed in the prior sectionwe want to customize the constructor logic for managers in such way as to provide job name automatically in terms of codewe want to redefine an __init__ method in manager that provides the mgr string for us and as in giveraise customizationwe also want to run the original __init__ in person by calling through the class nameso it still initializes our objectsstate information attributes the following extension to person py will do the job--we've coded the new manager constructor and changed the call that creates tom to not pass in the mgr job namefile person py add customization of constructor in subclass class persondef __init__(selfnamejob=nonepay= )self name name more realistic example