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

Skip to content

Commit 2ef7e6c

Browse files
committed
SF bug #1052503: pdb runcall should accept keyword arguments
1 parent 9047c8f commit 2ef7e6c

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

Lib/bdb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,13 @@ def runctx(self, cmd, globals, locals):
391391

392392
# This method is more useful to debug a single function call.
393393

394-
def runcall(self, func, *args):
394+
def runcall(self, func, *args, **kwds):
395395
self.reset()
396396
sys.settrace(self.trace_dispatch)
397397
res = None
398398
try:
399399
try:
400-
res = func(*args)
400+
res = func(*args, **kwds)
401401
except BdbQuit:
402402
pass
403403
finally:

Lib/pdb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -993,8 +993,8 @@ def runctx(statement, globals, locals):
993993
# B/W compatibility
994994
run(statement, globals, locals)
995995

996-
def runcall(*args):
997-
return Pdb().runcall(*args)
996+
def runcall(*args, **kwds):
997+
return Pdb().runcall(*args, **kwds)
998998

999999
def set_trace():
10001000
Pdb().set_trace()

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Extension Modules
4545
Library
4646
-------
4747

48+
- Bug #1052503 pdb.runcall() was not passing along keyword arguments.
49+
4850
- Bug #902037: XML.sax.saxutils.prepare_input_source() now combines relative
4951
paths with a base path before checking os.path.isfile().
5052

0 commit comments

Comments
 (0)