diff Python/ceval.c @ 5177:b18e03ba4817 legacy-trunk

Clarify error message for unexpected keyword parameter.
author Guido van Rossum <guido@python.org>
date Mon, 10 Mar 1997 22:58:23 +0000
parents b4231d592281
children f2132d1f66a6
line wrap: on
line diff
--- a/Python/ceval.c	Fri Mar 07 21:05:43 1997 +0000
+++ b/Python/ceval.c	Mon Mar 10 22:58:23 1997 +0000
@@ -1,3 +1,4 @@
+
 /***********************************************************
 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
 The Netherlands.
@@ -461,7 +462,9 @@
 			}
 			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);