Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5cf6394

Browse files
committed
Use PyArg_UnpackTuple() where possible.
1 parent 4514369 commit 5cf6394

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/bltinmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1806,7 +1806,7 @@ builtin_sum(PyObject *self, PyObject *args)
18061806
PyObject *result = NULL;
18071807
PyObject *temp, *item, *iter;
18081808

1809-
if (!PyArg_ParseTuple(args, "O|O:sum", &seq, &result))
1809+
if (!PyArg_UnpackTuple(args, "sum", 1, 2, &seq, &result))
18101810
return NULL;
18111811

18121812
iter = PyObject_GetIter(seq);

0 commit comments

Comments
 (0)