mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Document why functools.partial() must copy kwargs (#253)
Add a comment to prevent further attempts to avoid a copy for optimization.
This commit is contained in:
parent
324c5d8ca6
commit
561ca80cff
2 changed files with 5 additions and 2 deletions
|
|
@ -317,8 +317,8 @@ _PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
|
|||
if (nk != 0) {
|
||||
Py_ssize_t pos, i;
|
||||
|
||||
/* Issue #29318: Caller and callee functions must not share the
|
||||
dictionary: kwargs must be copied. */
|
||||
/* bpo-29318, bpo-27840: Caller and callee functions must not share
|
||||
the dictionary: kwargs must be copied. */
|
||||
kwtuple = PyTuple_New(2 * nk);
|
||||
if (kwtuple == NULL) {
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue