this doeshowevermake object wrappers more work than they used to be when operator overloading methods are part of wrapped object' interface keep in mind that this issue applies only to __getattr__ and __getattribute__ because properties and descriptors are defined for specific attributes onlythey don' really apply to delegation-based classes at all-- single property or descriptor cannot be used to intercept arbitrary attributes moreovera class that defines both operator overloading methods and attribute interception will work correctlyregardless of the type of attribute interception defined our concern here is only with classes that do not have operator overloading methods definedbut try to intercept them generically consider the following examplethe file getattr-bultins pywhich tests various attribute types and built-in operations on instances of classes containing __getattr__ and __get attribute__ methodsclass getattreggs eggs stored on classspam on instance def __init__(self)self spam def __len__(self)len hereelse __getattr__ called with __len__ print('__len__ 'return def __getattr__(selfattr)provide __str__ if askedelse dummy func print('getattrattrif attr ='__str__'return lambda *args'[getattr str]elsereturn lambda *argsnone class getattribute(object)object required in ximplied in eggs in all are isinstance(objectauto def __init__(self)but must derive to get new-style toolsself spam incl __getattribute__some __x__ defaults def __len__(self)print('__len__ 'return def __getattribute__(selfattr)print('getattributeattrif attr ='__str__'return lambda *args'[getattribute str]elsereturn lambda *argsnone for class in getattrgetattributeprint('\nclass __name__ ljust( '=') class( eggs spam other len( managed attributes class attr instance attr missing attr __len__ defined explicitly