specially named methods such as __init____add__and __str__ are inherited by subclasses and instancesjust like any other names assigned in class if they're not coded in classpython looks for such names in all its superclassesas usual operator overloading method names are also not built-in or reserved wordsthey are just attributes that python looks for when objects appear in various contexts python usually calls them automaticallybut they may occasionally be called by your code as well for examplethe __init__ method is often called manually to trigger initialization steps in superclassas we'll see in the next returning resultsor not some operator overloading methods like __str__ require resultsbut others are more flexible for examplenotice how the __add__ method makes and returns new instance object of its classby calling thirdclass with the result value--which in turn triggers __init__ to initialize the result this is common conventionand explains why in the listing has display methodit' thirdclass object toobecause that' what returns for this class' objects this essentially propagates the type by contrastmul changes the current instance object in placeby reassigning the self attribute we could overload the expression to do the latterbut this would be too different from the behavior of for built-in types such as numbers and stringsfor which it always makes new objects common practice dictates that overloaded operators should work the same way that built-in operator implementations do because operator overloading is really just an expression-to-method dispatch mechanismthoughyou can interpret operators any way you like in your own class objects why use operator overloadingas class designeryou can choose to use operator overloading or not your choice simply depends on how much you want your object to look and feel like built-in types as mentioned earlierif you omit an operator overloading method and do not inherit it from superclassthe corresponding operation will not be supported for your instancesif it' attemptedan exception will be raised (orin some cases like printinga standard default will be usedfranklymany operator overloading methods tend to be used only when you are implementing objects that are mathematical in naturea vector or matrix class may overload the addition operatorfor examplebut an employee class likely would not for simpler classesyou might not use overloading at alland would rely instead on explicit method calls to implement your objectsbehavior on the other handyou might decide to use operator overloading if you need to pass user-defined object to function that was coded to expect the operators available on built-in type like list or dictionary implementing the same operator set in your class will ensure that your objects support the same expected object interface and so are compatible with the function although we won' cover every operator overloading class coding basics