On Wed, Jun 19, 2019 at 6:47 AM Victor Stinner firstname.lastname@example.org wrote:
While its API is not perfect (need to declare a local array of arguments), _PyObject_FastCall() is efficient for an arbitrary number of positional arguments.
_PyObject_CallVaArgs(..., NULL) with variable number of positional arguments, null terminated?
My experience with mixing Python and C is that I never want to use keyword arguments in C code calling Python. At this low level I don't think it is imposing on the programmer to know exactly what args they need to use. Or maybe it's just the C mindset.
I can imagine a method/function implemented in C that needs to pass through keyword arguments to another method or function, but that would be as a single dict.