This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients python-dev, scoder, serhiy.storchaka, vstinner
Date 2016-09-12.12:59:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473685143.99.0.125645430994.issue27810@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2016-09-12 12:59:04vstinnersetrecipients: + vstinner, scoder, python-dev, serhiy.storchaka
2016-09-12 12:59:03vstinnersetmessageid: <1473685143.99.0.125645430994.issue27810@psf.upfronthosting.co.za>
2016-09-12 12:59:03vstinnerlinkissue27810 messages
2016-09-12 12:59:03vstinnercreate