diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2014-03-27 22:42:52 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2014-03-27 22:42:52 (GMT) |
commit | 2542b66bb04e5634410205f54523987dce9e5bf7 (patch) | |
tree | f7c8072b257c67a1ed087f735cd9c7f6541f829e /Lib/inspect.py | |
parent | b1d060bf8b017d2a6cf6a0191b1451aeb27a5c03 (diff) | |
download | cpython-2542b66bb04e5634410205f54523987dce9e5bf7.zip cpython-2542b66bb04e5634410205f54523987dce9e5bf7.tar.gz cpython-2542b66bb04e5634410205f54523987dce9e5bf7.tar.bz2 |
inspect: Fix getcallargs() to fail correctly if more than 3 args are missing.
Patch by Jeremiah Lowin. Closes #20817.
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 06057af..9f9a600 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -1125,7 +1125,7 @@ def _missing_arguments(f_name, argnames, pos, values): elif missing == 2: s = "{} and {}".format(*names) else: - tail = ", {} and {}".format(names[-2:]) + tail = ", {} and {}".format(*names[-2:]) del names[-2:] s = ", ".join(names) + tail raise TypeError("%s() missing %i required %s argument%s: %s" % |