diff options
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index 54365313b1..a976c8b43c 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -881,8 +881,8 @@ def formatargspec(args, varargs=None, varkw=None, defaults=None, specs = [] if defaults: firstdefault = len(args) - len(defaults) - for i in range(len(args)): - spec = strseq(args[i], formatargandannotation, join) + for i, arg in enumerate(args): + spec = strseq(arg, formatargandannotation, join) if defaults and i >= firstdefault: spec = spec + formatvalue(defaults[i - firstdefault]) specs.append(spec) |