This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Python bug #20108: getcallargs() with func keyword
- Loading branch information
Showing
9 changed files
with
35 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.7.10.p2 | ||
2.7.10.p3 |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# HG changeset patch | ||
# User Benjamin Peterson <benjamin@python.org> | ||
# Date 1388687048 21600 | ||
# Node ID b0d472e3ff42de9fd2b1a702f5874202c2d2b27f | ||
# Parent 8083b887068667a7b62443d56de310e7fe10d3df | ||
avoid parameter name clash (closes #20108) | ||
|
||
diff -ru a/Lib/inspect.py b/Lib/inspect.py | ||
--- a/Lib/inspect.py 2015-05-23 18:09:04.000000000 +0200 | ||
+++ b/Lib/inspect.py 2016-09-21 11:34:16.491938401 +0200 | ||
@@ -892,12 +892,14 @@ | ||
specs.append(formatvarkw(varkw) + formatvalue(locals[varkw])) | ||
return '(' + string.join(specs, ', ') + ')' | ||
|
||
-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:] | ||
args, varargs, varkw, defaults = getargspec(func) | ||
f_name = func.__name__ | ||
arg2value = {} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.