diff options
author | Guido van Rossum <guido@python.org> | 1996-08-19 22:09:16 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-19 22:09:16 (GMT) |
commit | 6d43c5de5a5958519d620a3cf9bd4efead350e58 (patch) | |
tree | 4f155a1fe35dd990b40f382e52ec5dc01e33a8a0 /Python | |
parent | 3f3bb3d3c9a616fa22b2cf7ca70c9b05295f61f3 (diff) | |
download | cpython-6d43c5de5a5958519d620a3cf9bd4efead350e58.zip cpython-6d43c5de5a5958519d620a3cf9bd4efead350e58.tar.gz cpython-6d43c5de5a5958519d620a3cf9bd4efead350e58.tar.bz2 |
Raise TypeError, not KeyError, on unknown keyword argument.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 5c812c0..5ccccbb 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -28,7 +28,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. XXX how to pass arguments to call_trace? XXX totally get rid of access stuff XXX speed up searching for keywords by using a dictionary - XXX unknown keyword shouldn't raise KeyError? XXX document it! */ @@ -449,7 +448,7 @@ eval_code2(co, globals, locals, } if (j >= co->co_argcount) { if (kwdict == NULL) { - err_setval(KeyError/*XXX*/, keyword); + err_setval(TypeError, keyword); goto fail; } mappinginsert(kwdict, keyword, value); |