PyArg_ParseTuple() on arbitrary tuples

梦想与她 提交于 2019-12-12 05:38:41

问题


I am looking for confirmation on this issue:

Can I use PyArg_ParseTuple() on any Python tuple, or just on those passed as argument lists from function calls?

I see strong indication for the former, but to my reading the documentation is rather vague on this point, hence my question here.


回答1:


The only problem is that the error messages, if an error occurs while parsing the tuple, will be appropriate to a function call.

Otherwise, it should work on arbitrary tuples just as well as on argument lists.



来源:https://stackoverflow.com/questions/23200484/pyarg-parsetuple-on-arbitrary-tuples

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!