diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-03-21 20:21:00 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-03-21 20:21:00 +0000 |
commit | 965458931ff6fae2090fa4ddd95cb7f81ce2bcc1 (patch) | |
tree | fa762b6b42f6215204b3faf33de108845de5f35a /Lib/test/test_extcall.py | |
parent | 54bc22e9f333547ef6183fb79c897aeecc19db14 (diff) | |
download | cpython-git-965458931ff6fae2090fa4ddd95cb7f81ce2bcc1.tar.gz |
improve error message from passing inadequate number of keyword arguments #6474
Note this removes the "non-keyword" or "keyword" phrases from these messages.
Diffstat (limited to 'Lib/test/test_extcall.py')
-rw-r--r-- | Lib/test/test_extcall.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py index 3eea121331..bb922c884d 100644 --- a/Lib/test/test_extcall.py +++ b/Lib/test/test_extcall.py @@ -270,6 +270,15 @@ the function call setup. See <http://bugs.python.org/issue2016>. ... print a,b >>> f(**x) 1 2 + +A obscure message: + + >>> def f(a, b): + ... pass + >>> f(b=1) + Traceback (most recent call last): + ... + TypeError: f() takes exactly 2 arguments (1 given) """ import unittest |