Use PyArg_UnpackTuple() where possible.

This commit is contained in:
Raymond Hettinger 2003-10-25 06:41:37 +00:00
parent 4514369f27
commit 5cf6394b12
1 changed files with 1 additions and 1 deletions

View File

@ -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);