mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Use PyArg_UnpackTuple() where possible.
This commit is contained in:
parent
4514369f27
commit
5cf6394b12
1 changed files with 1 additions and 1 deletions
|
@ -1806,7 +1806,7 @@ builtin_sum(PyObject *self, PyObject *args)
|
|||
PyObject *result = NULL;
|
||||
PyObject *temp, *item, *iter;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O|O:sum", &seq, &result))
|
||||
if (!PyArg_UnpackTuple(args, "sum", 1, 2, &seq, &result))
|
||||
return NULL;
|
||||
|
||||
iter = PyObject_GetIter(seq);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue