summaryrefslogtreecommitdiff
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2014-03-27 18:42:52 -0400
committerYury Selivanov <yselivanov@sprymix.com>2014-03-27 18:42:52 -0400
commit06c31f17c0611fbc3e37b21562118e5a61137878 (patch)
tree884895c5c7862878a198122a20c435ef2c043bb6 /Lib/inspect.py
parent11a4cb46ed8c174dea49b6e135cc143391fec813 (diff)
downloadcpython-06c31f17c0611fbc3e37b21562118e5a61137878.tar.gz
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 06057afaf2..9f9a600815 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" %