diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-06-25 19:30:21 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-06-25 19:30:21 +0000 |
commit | 142b3f5685806ec7e1a0ebba13eacd7762616078 (patch) | |
tree | 22756f0b57eae9b89f665290771a5f71b5cb7def /Lib/inspect.py | |
parent | c6f5f74f4aefb378611274d3463e3b62f756b9d9 (diff) | |
download | cpython-142b3f5685806ec7e1a0ebba13eacd7762616078.tar.gz |
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 d6ac4e02ca..bfb6d00b5b 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: |