person object correctlyc:\codec:\python \python from access import private @private('age'class persondef __init__(self)self age def __str__(self)return 'personstr(self agedef __add__(selfyrs)self age +yrs person( age typeerrorprivate attribute fetchage print(xperson print(xperson name validations fail correctly __getattr__ =runs person __str__ __getattr__ =runs person __add__ __getattr__ =runs person __str__ when the same code is run under python xthoughthe implicitly invoked __str__ and __add__ skip the decorator' __getattr__ and look for definitions in or above the decorator class itselfprint winds up finding the default display inherited from the class type (technicallyfrom the implied object superclass in )and generates an error because no default is inheritedc:\codec:\python \python from access import private @private('age'class persondef __init__(self)self age def __str__(self)return 'personstr(self agedef __add__(selfyrs)self age +yrs person(name validations still work age but fails to delegate built-instypeerrorprivate attribute fetchage print(xondecorator oninstance object at etcx typeerrorunsupported operand type(sfor +'oninstanceand 'intprint(xondecorator oninstance object at etcstrangelythis occurs only for dispatch from built-in operationsexplicit direct calls to overload methods are routed to __getattr__though clients using operator overloading can' be expected to do the sameexample"privateand "publicattributes