[Python-Dev] On the METH_FASTCALL calling convention
INADA Naoki
songofacandy at gmail.com
Fri Jul 6 00:07:46 EDT 2018
I don't know Serhiy's idea about how METH_FASTCALL | METH_KEYWORDS
calling convention can be improved in the future.
When I reading PEP 580, I liked your Py PyCCall_FastCall signature.
Maybe, one way to improve METH_FASTCALL | METH_KEYWORDS can be this.
kwds can be either tuple or dict.
---
Anyway, if we don't make METH_FASTCALL | METH_KEYWORDS public for now,
can we continue both PEPs without exposing keyword arguments support?
For example, PEP 576 defines new signature:
typedef PyObject *(*extended_call_ptr)(PyObject *callable, PyObject** args,
int positional_argcount, PyTupleObject* kwnames);
`PyTupleObject *kwnames` can be `PyObject *reserved` and "should be NULL always"
in document?
PEP 580 is more simple. Keeping CCALL_KEYWORDS private.
I think Cython is the most important user of these PEPs. And Cython creates
functions supporting keywords easily, like Python. So this can be worthless...
--
INADA Naoki <songofacandy at gmail.com>
More information about the Python-Dev
mailing list