Skip to content

Commit 5a95ba2

Browse files
Eric Lippertambv
authored andcommitted
Fix issue 34551 - remove redundant store (#9009)
The assignment of i/2 to nk is redundant because on this code path, nk is already the size of the dictionary, and i is already twice the size of the dictionary. I've replaced the store with an assertion that i/2 is nk.
1 parent 2447773 commit 5a95ba2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/call.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ _PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs
352352
Py_INCREF(k[i+1]);
353353
i += 2;
354354
}
355-
nk = i / 2;
355+
assert(i / 2 == nk);
356356
}
357357
else {
358358
kwtuple = NULL;

0 commit comments

Comments
 (0)