From: Victor Stinner Date: Thu, 19 Jan 2017 11:45:06 +0000 (+0100) Subject: Add a note explaining why dict_update() doesn't use METH_FASTCALL X-Git-Tag: v3.7.0a1~1509 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91f0d4aa2fae249479e5ecdc76aee6f5c13d0994;p=python Add a note explaining why dict_update() doesn't use METH_FASTCALL Issue #29312. --- diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 1a6eedd738..f9414865ad 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -2347,6 +2347,9 @@ dict_update_common(PyObject *self, PyObject *args, PyObject *kwds, return result; } +/* Note: dict.update() uses the METH_VARARGS|METH_KEYWORDS calling convention. + Using METH_FASTCALL would make dict.update(**dict2) calls slower, see the + issue #29312. */ static PyObject * dict_update(PyObject *self, PyObject *args, PyObject *kwds) {