Message276033
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_FastCallDict(): expect a Python dict for keyword arguments
* _PyObject_FastCallKeywods(): expect a Python tuple for keys of keyword arguments, keyword values are packed in the same array than positional arguments
_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). |
|
Date |
User |
Action |
Args |
2016-09-12 12:59:04 | vstinner | set | recipients:
+ vstinner, scoder, python-dev, serhiy.storchaka |
2016-09-12 12:59:03 | vstinner | set | messageid: <1473685143.99.0.125645430994.issue27810@psf.upfronthosting.co.za> |
2016-09-12 12:59:03 | vstinner | link | issue27810 messages |
2016-09-12 12:59:03 | vstinner | create | |
|