summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-03-10 22:58:23 +0000
committerGuido van Rossum <guido@python.org>1997-03-10 22:58:23 +0000
commitf7a108a1fe932e5a3ab110a0f20bffb80b6bc81f (patch)
tree35c357ed8d49378bf1dd4501b96bf677eb2e5efa /Python
parente6cb992c5d93b8d69805cafbdfa521036f113e7c (diff)
downloadcpython-f7a108a1fe932e5a3ab110a0f20bffb80b6bc81f.tar.gz
Clarify error message for unexpected keyword parameter.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 37a41687fb..23fefe4233 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);