guido van rossum hoaufpythonorg wed apr 2 2008 630 nick coghlan wrote one issues porting py3k problem __getattr__ __getattribute__ cant reliably provide special methods like __add__ way __getattr__ could classic classes first noted terry reedy years ago recently seeing new activity bug tracker 1 culprit fact __getattribute__ associated machinery typically never invoked methods dedicated tp_ slots clevel type structure well yes intentional part newstyle class design people think idea providing extra method type objects goes clevel special method slots one isnt currently set getattr associated special name stores result current type object getattr since seem thinking specifically proxies im thinking youre getattr instance seems wrong base type slots converting proxy class relies __getattr__ classic show specific code proxy class im hard time imagining would work used proxies really long time newstyle would needed invoke new method class object defining class class decorator metaclass could provided somewhere make bit tidier hm thinking proxy class note set class attribute corresponding special method eg c__add__ corresponding c slot automatically updated able write class decorator mixin helper function pure python unless completely misunderstand youre seems lot cleaner expecting everyone implements proxy object maintain list relevant special methods locates implementation support area code already plenty infrastructure dedicated keeping python visible attributes sync c visible tp_ slots many proxy implementations world need maybe add one stdlib thoughts altenative ideas howls protest far bit confusion guido van rossum home page httpwwwpythonorgguido _______________________________________________ python3000 mailing list smsbmo9552pythonorg httpmailpythonorgmailmanlistinfopython3000 unsubscribe httpmailpythonorgmailmanoptionspython3000python300040tangomucom wed 06 aug 2008 223848 0700 python3000 method populate tp_ slots via getattr