Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix pdb.line_prefix binding in print_stack_entry
  • Loading branch information
pareshjoshij authored Nov 20, 2025
commit 9ee94a2e19ac0bd1213252e962c67479f0af6a23
6 changes: 4 additions & 2 deletions Lib/pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ def _show_display(self):

def _get_tb_and_exceptions(self, tb_or_exc):
"""
Given a tracecack or an exception, return a tuple of chained exceptions
Given a traceback or an exception, return a tuple of chained exceptions
and current traceback to inspect.

This will deal with selecting the right ``__cause__`` or ``__context__``
Expand Down Expand Up @@ -2429,7 +2429,9 @@ def print_stack_trace(self, count=None):
except KeyboardInterrupt:
pass

def print_stack_entry(self, frame_lineno, prompt_prefix=line_prefix):
def print_stack_entry(self, frame_lineno, prompt_prefix=None):
if prompt_prefix is None:
prompt_prefix = line_prefix
frame, lineno = frame_lineno
if frame is self.curframe:
prefix = '> '
Expand Down