fix #4720: the format to PyArg_ParseTupleAndKeywords can now start with '|'

This commit is contained in:
Benjamin Peterson 2008-12-22 20:51:15 +00:00
parent 1c39785256
commit 4caef5c7e2
2 changed files with 28 additions and 1 deletions

View file

@ -1601,7 +1601,7 @@ vgetargskeywords(PyObject *args, PyObject *keywords, const char *format,
}
}
if (!IS_END_OF_FORMAT(*format)) {
if (!IS_END_OF_FORMAT(*format) && *format != '|') {
PyErr_Format(PyExc_RuntimeError,
"more argument specifiers than keyword list entries "
"(remaining format:'%s')", format);