obj giveraise default or custom for obj in dbprint(obj lastname()'=>'obj paysmith = jones = doe = refactoring code before we move onthere are few coding alternatives worth noting here most of these underscore the python oop modeland they serve as quick review augmenting methods as first alternativenotice that we have introduced some redundancy in example - the raise calculation is now repeated in two places (in the two classeswe could also have implemented the customized manager class by augmenting the inherited raise method instead of replacing it completelyclass manager(person)def giveraise(selfpercentbonus= )person giveraise(selfpercent bonusthe trick here is to call back the superclass' version of the method directlypassing in the self argument explicitly we still redefine the methodbut we simply run the general version after adding percent (by defaultto the passed-in percentage this coding pattern can help reduce code redundancy (the original raise method' logic appears in only one place and so is easier to changeand is especially handy for kicking off superclass constructor methods in practice if you've already studied python oopyou know that this coding scheme works because we can always call methods through either an instance or the class name in generalthe following are equivalentand both forms may be used explicitlyinstance method(arg arg class method(instancearg arg in factthe first form is mapped to the second--when calling through the instancepython determines the class by searching the inheritance tree for the method name and passes in the instance automatically either waywithin giveraiseself refers to the instance that is the subject of the call display format for more object-oriented funwe could also add few operator overloading methods to our people classes for examplea __str__ methodshown herecould return string step stepping up to oop