[Python-checkins] cpython: Add a note explaining why dict_update() doesn't use METH_FASTCALL

victor.stinner python-checkins at python.org
Thu Jan 19 06:45:24 EST 2017


https://hg.python.org/cpython/rev/e371686229e7
changeset:   106230:e371686229e7
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Jan 19 12:45:06 2017 +0100
summary:
  Add a note explaining why dict_update() doesn't use METH_FASTCALL

Issue #29312.

files:
  Objects/dictobject.c |  3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/Objects/dictobject.c b/Objects/dictobject.c
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -2347,6 +2347,9 @@
     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)
 {

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list