Hi, 2016-12-10 7:43 GMT+01:00 Serhiy Storchaka <storchaka@gmail.com>:
It is documented for Py_BuildValue(), and the documentation of PyObject_CallFunction() refers to Py_BuildValue().
You're right, but even if I read the documentation of Py_BuildValue() every week, I never noticed that PyObject_CallFunction() behaves differently if the result of Py_BuildValue() is a tuple or not. It is not explicit in the PyObject_CallFunction() documentation. Anyway, as I wrote, it would be a bad idea to change the behaviour, it would break too much C code in the wild, so I just proposed a patch to enhance the documentation: http://bugs.python.org/issue28977
I just found that in spite of your changes of parameter names, the documentation still have old names:
PyObject* PyObject_CallMethod(PyObject *o, const char *method, const char *format, ...)
Ah? It's possible that I forgot to update the documentation of some functions. But sorry, I don't see where. Can you point me which file is outdated please? Since I finished to "cleanup abstract.h" (issue #28838), I will now work on updating the documentation (doc in .rst files and comments in .h files) of functions of the PyObject_Call() family. At least, make sure that .rst and .h almost contain the same doc ;-) Victor