operations are never routed through either attribute interception method in xpython ' new-style classes search for such attributes in classes and skip instance lookup entirely normally named attributes do not this makes delegation-based wrapper classes more difficult to code in ' new-style classes--if wrapped classes may contain operator overloading methodsthose methods must be redefined redundantly in the wrapper class in order to delegate to the wrapped object in general delegation toolsthis can add dozens of extra methods of coursethe addition of such methods can be partly automated by tools that augment classes with new methods (the class decorators and metaclasses of the next two might help heremoreovera superclass might be able to define all these extra methods oncefor inheritance in delegation-based classes stilldelegation coding patterns require extra work in ' classes for more realistic illustration of this phenomenon as well as its workaroundsee the private decorator example in the following therewe'll explore alternatives for coding the operator methods required of proxies in ' classes--including reusable mix-in superclass models we'll also see there that it' possible to insert __getat tribute__ in the client class to retain its original typealthough this method still won' be called for operator overloading methodsprinting still runs __str__ defined in such class directlyfor exampleinstead of routing the request through __getattribute__ as more realistic example of thisthe next section resurrects our class tutorial example now that you understand how attribute interception worksi'll be able to explain one of its stranger bits delegation-based managers revisited the object-oriented tutorial of presented manager class that used object embedding and method delegation to customize its superclassrather than inheritance here is the code again for referencewith some irrelevant testing removedclass persondef __init__(selfnamejob=nonepay= )self name name self job job 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 managerdef __init__(selfnamepay)self person person(name'mgr'paydef giveraise(selfpercentbonus )embed person object __getattr__ and __getattribute__