cpython: 35302cc4fc93 (original) (raw)

Mercurial > cpython

changeset 90000:35302cc4fc93

inspect: Fix getcallargs() to fail correctly if more than 3 args are missing. Patch by Jeremiah Lowin. Closes #20817. [#20817]

Yury Selivanov yselivanov@sprymix.com
date Thu, 27 Mar 2014 18:42:52 -0400
parents 3de2e729d0fb
children ee0034434e65
files Lib/inspect.py Lib/test/test_inspect.py Misc/NEWS
diffstat 3 files changed, 10 insertions(+), 1 deletions(-)[+] [-] Lib/inspect.py 2 Lib/test/test_inspect.py 6 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -1127,7 +1127,7 @@ def _missing_arguments(f_name, argnames, elif missing == 2: s = "{} and {}".format(*names) else:

--- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -1216,6 +1216,12 @@ class TestGetcallargsFunctions(unittest. inspect.getcallargs(f5)

+ class TestGetcallargsMethods(TestGetcallargsFunctions): def setUp(self):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -116,6 +116,9 @@ Library