summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2014-03-27 22:42:52 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2014-03-27 22:42:52 (GMT)
commitdccfa13cdbdb618da3f45f1023c6626be6abb056 (patch)
treed71574745b39ffd6efaad082db7c3ff8c5a619b5 /Lib/inspect.py
parent875df20e8a2a9bad07a42f0175be019d915e0845 (diff)
downloadcpython-dccfa13cdbdb618da3f45f1023c6626be6abb056.zip
cpython-dccfa13cdbdb618da3f45f1023c6626be6abb056.tar.gz
cpython-dccfa13cdbdb618da3f45f1023c6626be6abb056.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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index fdb5e2a..bb31098 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -1127,7 +1127,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" %