diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-01-02 18:26:50 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-01-02 18:26:50 (GMT) |
commit | c22eaecd53a3d9dc7ca441e6d6f1e0148469f1e9 (patch) | |
tree | fdfd9e3a83f10070bfd06a678775af047cc09d48 /Lib/inspect.py | |
parent | 393a94243f47fb02c936945e6931427c6adefbcf (diff) | |
parent | 3e6ab1715d13deab644e02e05d978ccb17241176 (diff) | |
download | cpython-c22eaecd53a3d9dc7ca441e6d6f1e0148469f1e9.zip cpython-c22eaecd53a3d9dc7ca441e6d6f1e0148469f1e9.tar.gz cpython-c22eaecd53a3d9dc7ca441e6d6f1e0148469f1e9.tar.bz2 |
merge 3.3 (closes #20108)
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index dc94e44..7c954eb 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -1087,12 +1087,14 @@ def _too_many(f_name, args, kwonly, varargs, defcount, given, values): (f_name, sig, "s" if plural else "", given, kwonly_sig, "was" if given == 1 and not kwonly_given else "were")) -def getcallargs(func, *positional, **named): +def getcallargs(*func_and_positional, **named): """Get the mapping of arguments to values. A dict is returned, with keys the function argument names (including the names of the * and ** arguments, if any), and values the respective bound values from 'positional' and 'named'.""" + func = func_and_positional[0] + positional = func_and_positional[1:] spec = getfullargspec(func) args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, ann = spec f_name = func.__name__ |