STINNER Victor <[email protected]> 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 <[email protected]>
<https://bugs.python.org/issue37499>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com