[issue37499] test_gdb.test_pycfunction should use dedicated test functions
STINNER Victor
report at bugs.python.org
Fri Jul 5 04:52:18 EDT 2019
STINNER Victor <vstinner at redhat.com> added the comment:
By the way, PyObject_CallFunction("O") has a surprising behavior: if you pass a tuple, the tuple is unpacked, whereas any other type is passed directly. See bpo-28977.
I would prefer to fix the API since it caused severe bugs in the past, like asyncio generator bug bpo-21209.
But I'm not sure if we can do it without a deprecation period... I'm not sure that we should deprecate anything, since I would expect that PyObject_CallFunction(func, "O", tuple) calls func(tuple) rather than func(*tuple)...
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37499>
_______________________________________
More information about the Python-bugs-list
mailing list