cpython: 9f06cbb7962b (original) (raw)

Mercurial > cpython

changeset 90001:9f06cbb7962b 3.4

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 070dfca74610
children 9e3fc66ee0b8
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 @@ -1125,7 +1125,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 @@ -1214,6 +1214,12 @@ class TestGetcallargsFunctions(unittest. inspect.getcallargs(f5)

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

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