haoyu bai nfkfqhcfugmailcom hello im gsoc student working swigs python 3 support experiment python 3s new features different behavior binding function builtin_function_or_method confused know unbound method removed python 3 bind function class directly use instead myclassmyfunc func case builtin function cant work code demonstrates class test pass def afuncargs printargs testprt print testfunc afunc test tprt nothing tfunc __main__test object 0xb79987ec know bug however exception language python trying avoid since c function extension module treated builtin function method problem maybe bigger looks like swigs case originally uses newinstancemethod generate unbound method c function dll module code snippet looks like class testbaseobject proxy c testbase class unrelated code omitted pass _testtestbase_test c function _test dll module testbasetest newinstancemethod_testtestbase_testnonetestbase corresponding way python 3 workaround found types import methodtype class testbaseobject proxy c testbase class def __init__self args initialization code selftest methodtype_testtestbase_test self changed original code structure migration would complicated better way get rid thank lot best regards haoyu bai 4272008 _______________________________________________ python3000 mailing list smsbmo9552pythonorg httpmailpythonorgmailmanlistinfopython3000 unsubscribe httpmailpythonorgmailmanoptionspython3000python300040tangomucom fri 08 aug 2008 101145 0800 python3000 binding builtin function class