bpo-36969: Make PDB args command display positional only arguments (GH-13459)

This commit is contained in:
Rémi Lapeyre 2019-05-24 22:44:31 +02:00 committed by Pablo Galindo
parent deffee5774
commit 458560347f
3 changed files with 31 additions and 6 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_kwonlyargcount
n = co.co_argcount + co.co_posonlyargcount + 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):