[New-bugs-announce] [issue27809] _PyObject_FastCall(): add support for keyword arguments

STINNER Victor report at bugs.python.org
Fri Aug 19 20:21:25 EDT 2016


New submission from STINNER Victor:

_PyObject_FastCall() (added in the issue #27128) already supports keyword arguments for C functions, but not Python functions.

Attached patch adds support for keyword arguments in _PyFunction_FastCall(), to allow to use _PyObject_FastCall() in more cases.

Examples of functions that can be modified to _PyObject_FastCall() with this change:

* builtin_sorted()
* builtin___build_class__()
* init_subclass()
* PyEval_CallObjectWithKeywords(func, NULL, kwargs)
* methoddescr_call(), classmethoddescr_call(), wrapperdescr_call()
* PyFile_GetLine()

Moreover, supporting keywords is required for another more important step: add a new METH_CALL calling convention for C functions.

----------
files: fastcall_kwargs.patch
keywords: patch
messages: 273170
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: _PyObject_FastCall(): add support for keyword arguments
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file44162/fastcall_kwargs.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27809>
_______________________________________


More information about the New-bugs-announce mailing list