Kaydet (Commit) c43b6850 authored tarafından Guido van Rossum's avatar Guido van Rossum

Clarify error message for unexpected keyword parameter.

üst 27e280dc
/***********************************************************
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
The Netherlands.
......@@ -461,7 +462,9 @@ eval_code2(co, globals, locals,
}
if (j >= co->co_argcount) {
if (kwdict == NULL) {
err_setval(TypeError, keyword);
PyErr_Format(TypeError,
"unexpected keyword argument: %.400s",
getstringvalue(keyword));
goto fail;
}
mappinginsert(kwdict, keyword, value);
......
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