bpo-37122: Make co->co_argcount represent the total number of positonal arguments in the code object (GH-13726)

This commit is contained in:
Pablo Galindo 2019-06-01 18:08:04 +01:00 committed by GitHub
parent 059b9ea5ac
commit cd74e66a8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 74 additions and 88 deletions

View file

@ -1132,7 +1132,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
"""
co = self.curframe.f_code
dict = self.curframe_locals
n = co.co_argcount + co.co_posonlyargcount + co.co_kwonlyargcount
n = co.co_argcount + co.co_kwonlyargcount
if co.co_flags & inspect.CO_VARARGS: n = n+1
if co.co_flags & inspect.CO_VARKEYWORDS: n = n+1
for i in range(n):