问题
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