Message 276033 - Python tracker (original) (raw)

Stefan Behnel: "There is a tiny bit of a backwards compatibility concern as the new function signature would be incompatible with anything we had before,"

Python 3.6 will probably have two "fast call" calling convention:

_PyObject_FastCallKeywods() is not really written to be called directly: Python/ceval.c calls you, but you may call _PyObject_FastCallKeywods() again "wrapper" functions, like functools.partial().

Currently, tp_call (and tp_init and tp_new) still expects a (tuple, dict) for positional and keyword arguments, but later I will add something to also support METH_FASTCALL for callable objects. I just don't know yet what is the best option to make this change.

--

The main idea is implemented (implement METH_FASTCALL), I close the issue.

I will open new issues for more specific changes, and maybe extend the API (especially tp_call).