Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 91f0d4a

Browse files
committed
Add a note explaining why dict_update() doesn't use METH_FASTCALL
Issue python#29312.
1 parent 7dc6a5f commit 91f0d4a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Objects/dictobject.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,6 +2347,9 @@ dict_update_common(PyObject *self, PyObject *args, PyObject *kwds,
23472347
return result;
23482348
}
23492349

2350+
/* Note: dict.update() uses the METH_VARARGS|METH_KEYWORDS calling convention.
2351+
Using METH_FASTCALL would make dict.update(**dict2) calls slower, see the
2352+
issue #29312. */
23502353
static PyObject *
23512354
dict_update(PyObject *self, PyObject *args, PyObject *kwds)
23522355
{

0 commit comments

Comments
 (0)