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

Skip to content

Commit 61dde63

Browse files
committed
vgetargskeywords: Removed one of the mysterious PyErr_Clear() calls.
The "need" for this was probably removed by an earlier patch that stopped the loop right before it from passing NULL to a dict lookup routine. I still haven't convinced myself that the next loop is correct, so am leaving the next mysterious PyErr_Clear() call in for now.
1 parent b054be4 commit 61dde63

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

Python/getargs.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,18 +1099,9 @@ vgetargskeywords(PyObject *args, PyObject *keywords, char *format,
10991099
}
11001100
}
11011101
}
1102-
/* XXX The loop just above didn't used to break when hitting the
1103-
end of kwlist, so could pass NULL on to PyMapping_HasKeyString,
1104-
which sets a "NULL argument to internal routine" error then.
1105-
However, the comment below doesn't give any clues about which
1106-
'error string' it's talking about, so darned hard to say whether
1107-
the PyErr_Clear() still serves a purpose.
1108-
*/
1109-
PyErr_Clear(); /* I'm not which Py functions set the error string */
1110-
1102+
11111103
/* required arguments missing from args can be supplied by keyword
11121104
arguments */
1113-
11141105
len = nargs;
11151106
if (keywords && nargs < min) {
11161107
for (i = nargs; i < min; i++) {

0 commit comments

Comments
 (0)