我得到了下面的代码片段(整个程序都能正确编译和链接):try boost::python::exec_file( my_local_namespace return true;catch(const boost::python&pvalue, &ptraceback);
// the next line crashes on syntax err
一个可重复的例子: import tracebacktry:except (TypeError, AttributeError) as e:
traceback.print_exc(e) 这将在traceback.print_exc(e)处引发错误 TypeError: '>=' not supported between instances of 'AttributeError' and 'int' 有什么建议是为什么会发生这种情况吗?