for attr in builtinsexec('__%s__ proxydesc("__%s__")(attrattr)this coding may be the most concisebut also the most implicit and complexand is fairly tightly coupled with its subclasses by the shared name the loop at the end of this class is equivalent to the followingrun in the mix-in class' local scope--it creates descriptors that respond to initial name lookups by fetching from the wrapped object in __get__rather than catching the later operation call itself__add__ proxydesc("__add__"__str__ proxydesc("__str__"etc with such operator overloading methods added--either inline or by mix-in inheritance --the prior private example client that overloaded and print with __str__ and __add__ works correctly under and xas do subclasses that overload indexing and calls if you care to experiment furthersee files access _builtinspy in the book examples package for complete codings of these optionswe'll also employ that third of the mix-in options in solution to an end-of-quiz should operator methods be validatedadding support for operator overloading methods is required of interface proxies in generalto delegate calls correctly in our specific privacy applicationthoughit also raises some additional design choices in particularprivacy of operator overloading methods differs per implementationbecause they invoke __getattr__the rerouter mix-ins require either that all __x__ names accessed be listed in public decorationsor that private be used instead when operator overloading is present in clients in classes that use overloading heavilypublic may be impractical because they bypass __getattr__ entirelyas coded here both the inline scheme and self _wrapped mix-ins do not have these constraintsbut they preclude builtin operations from being made privateand cause built-in operation dispatch to work asymmetrically from both explicit __x__ calls by-name and ' default classic classes python classic classes have the first bullet' constraintssimply because all __x__ names are routed through __getattr__ automatically operator overloading names and protocols differ between and xmaking truly cross-version decoration less than trivial ( public decorators may need to list names from both lineswe'll leave final policy here tbdbut some interface proxies might prefer to allow __x__ operator names to always pass unchecked when delegated in the general casethougha substantial amount of extra code is required to accommodate ' new-style classes as delegation proxies--in principleevery operator example"privateand "publicattributes