-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The object calling API has grown organically over the years, and looks like an incomplete Cartesian product of features, with not-always-consistent naming.
For reference, here are the kinds of arguments the Call functions take:
Callable:
- given object
- given object's attribute; name given as
char* - given object's attribute; name given as Python string
- vectorcall
arg[0]attribute; name given as Python string
Positional arguments:
- no args
- single object
- tuple
- array+length with flag (vectorcall)
- format string + variadic arguments (
...) - format string +
va_list
Keyword arguments:
- none accepted
- dict
- tuple of names or NULL (vectorcall)
We have some requests to change things, like:
- PyObject_CallFunctionVa
- [C API] Add PyObject_VectorcallDict() to the limited C API python/cpython#120881
- describe PyEval_CallObjectWithKeywords and its replacement python/cpython#86347
Rather than evaluate each of those individually, perhaps we should look at the big picture.
How should this look, ideally?
How do we get there?
Metadata
Metadata
Assignees
Labels
No labels