diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-06-25 19:30:21 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-06-25 19:30:21 (GMT) |
commit | 88968ad380752227656e2ab4425315e474e26336 (patch) | |
tree | 87d0b51411b7c9910f96629eb1de7072b2a492a2 /Lib/inspect.py | |
parent | 5a3ef5b22af607666111c76764db0efffbef82be (diff) | |
download | cpython-88968ad380752227656e2ab4425315e474e26336.zip cpython-88968ad380752227656e2ab4425315e474e26336.tar.gz cpython-88968ad380752227656e2ab4425315e474e26336.tar.bz2 |
only take into account positional arguments count in related error messages
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index d6ac4e0..bfb6d00 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -959,7 +959,7 @@ def getcallargs(func, *positional, **named): else: arg2value[varargs] = () elif 0 < num_args < num_pos: - raise TypeError('%s() takes %s %d %s (%d given)' % ( + raise TypeError('%s() takes %s %d positional %s (%d given)' % ( f_name, 'at most' if defaults else 'exactly', num_args, 'arguments' if num_args > 1 else 'argument', num_total)) elif num_args == 0 and num_total: |