Use PyArg_UnpackTuple() where possible.
This commit is contained in:
parent
4514369f27
commit
5cf6394b12
|
@ -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…
Reference in New Issue