[docs] [issue28977] Document PyObject_CallFunction() special case more explicitly

STINNER Victor report at bugs.python.org
Fri Dec 16 03:14:52 EST 2016


STINNER Victor added the comment:

If the behaviour of PyObject_CallFunction(func, "O", arg) is changed, an application relying on the current behaviour would have to replace:

   res = PyObject_CallFunction(func, "O", arg);

with:

   /* code working on any Python version */
   if (PyTuple_Check(arg))
       res = PyObject_Call(func, arg, NULL);
   else
       res = PyObject_CallFunction(func, "O", arg);

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28977>
_______________________________________


More information about the docs mailing list