Commit 5cf6394b authored by Raymond Hettinger's avatar Raymond Hettinger

Use PyArg_UnpackTuple() where possible.

parent 4514369f
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment