diff options
author | Guido van Rossum <guido@python.org> | 1997-03-10 22:58:23 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-03-10 22:58:23 (GMT) |
commit | c43b6850544af69c1d489d23c5dbc9cab7aea5e8 (patch) | |
tree | a8621b59cc8748ddc6c2c86211a44266ec93f377 /Python/ceval.c | |
parent | 27e280dc7769427b0386dfc7b36e97a7b4274554 (diff) | |
download | cpython-c43b6850544af69c1d489d23c5dbc9cab7aea5e8.zip cpython-c43b6850544af69c1d489d23c5dbc9cab7aea5e8.tar.gz cpython-c43b6850544af69c1d489d23c5dbc9cab7aea5e8.tar.bz2 |
Clarify error message for unexpected keyword parameter.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 37a4168..23fefe4 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1,3 +1,4 @@ + /*********************************************************** 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); |