return ondecorator mix-in superclasses alternativelythese methods can be inserted by common superclass --given that there are dozens of such methodsan external class may be better suited to the taskespecially if it is general enough to be used in any such interface proxy class either of the following mix-in class schemes (among likely otherssuffice to catch and delegate built-ins operationsthe first catches built-ins and forcibly reroutes down to the subclass __get attr__ it requires that operator overloading names be public per the decorator' specificationsbut built-in operation calls will work the same as both explicit name calls and ' classic classes the second catches built-ins and reroutes to the wrapped object directly it requires access to and assumes proxy attribute named _wrapped giving access to the embedded object--which is less than ideal because it precludes wrapped objects from using the same name and creates subclass dependencybut better than using the mangled and class-specific _oninstance__wrappedand no worse than similarly named method like the inline approachboth of these mix-ins also require one method per built-in operation in general tools that proxy arbitrary objectsinterfaces notice how these classes catch operation calls rather than operation attribute fetchesand thus must perform the actual operation by delegating call or expressionclass builtinsmixindef __add__(selfother)return self __class__ __getattr__(self'__add__')(otherdef __str__(self)return self __class__ __getattr__(self'__str__')(def __getitem__(selfindex)return self __class__ __getattr__(self'__getitem__')(indexdef __call__(self*args**kargs)return self __class__ __getattr__(self'__call__')(*args**kargsplus any others needed def accesscontrol(failif)def ondecorator(aclass)class oninstance(builtinsmixin)rest unchanged def __getattr__(selfattr)def __setattr__(selfattrvalue)class builtinsmixindef __add__(selfother)return self _wrapped other def __str__(self)return str(self _wrappeddef __getitem__(selfindex)return self _wrapped[indexassume _wrapped bypass __getattr__ example"privateand "publicattributes