Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3d4ca74

Browse files
committed
change the named tuple returned by inspect.getfullargspec to have a 'kwonlydefaults' (as claimed by the docs) attribute instead of 'kwdefaults'
Fixes #4307 Reviewed by Christian
1 parent 3e8e9cc commit 3d4ca74

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/inspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ def getargspec(func):
791791
return ArgSpec(args, varargs, varkw, defaults)
792792

793793
FullArgSpec = namedtuple('FullArgSpec',
794-
'args, varargs, varkw, defaults, kwonlyargs, kwdefaults, annotations')
794+
'args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations')
795795

796796
def getfullargspec(func):
797797
"""Get the names and default values of a function's arguments.

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ Gyro Funch
230230
Peter Funk
231231
Geoff Furnish
232232
Ulisses Furquim
233+
Hagen F�rstenau
233234
Achim Gaedke
234235
Lele Gaifax
235236
Santiago Gala

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Core and Builtins
1919
Library
2020
-------
2121

22+
- Issue #4307: The named tuple that ``inspect.getfullargspec()`` returns now
23+
uses ``kwonlydefaults`` instead of ``kwdefaults``.
24+
2225
- Issue #4298: Fix a segfault when pickle.loads is passed a ill-formed input.
2326

2427
- Issue #4283: Fix a left-over "iteritems" call in distutils.

0 commit comments

Comments
 (0)