On 2019-05-06 00:04, Petr Viktorin wrote:
- Single bound method class for all kinds of function classes: This
would be a cleaner design, yes, but I don't see a pressing need. As
PEP 579 says, "this is a compounding issue", not a goal. As I recall,
that is the only major reason for CCALL_DEFARG.
Just a minor correction here: I guess that you mean CCALL_SELFARG. The
flag CCALL_DEFARG is for passing the PyCCallDef* in PEP 580, which is
mostly equivalent to passing the callable object in PEP 590.
The signature of PEP 580 is
func(const PyCCallDef *def, PyObject *self, PyObject *const *args,
Py_ssize_t nargs, PyObject *kwnames)
And with PEP 590 it is
func(PyObject *callable, PyObject *const *args, Py_ssize_t nargs,
PyObject *kwnames)
with the additional special role for the PY_VECTORCALL_ARGUMENTS_OFFSET
bit (which is meant to solve the problem of "self" in a different way).
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com