Bug Description
, in pdb.print_stack_entry, line_prefix is used as a default argument:
def print_stack_entry(self, frame_lineno, prompt_prefix=line_prefix):
This causes the value to be bound at definition time (when the module is imported). Any subsequent assignment to pdb.line_prefix by the user is ignored by this function.
Fix
Change the default argument to None and assign it inside the function body.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
Bug Description
, in
pdb.print_stack_entry,line_prefixis used as a default argument:def print_stack_entry(self, frame_lineno, prompt_prefix=line_prefix):This causes the value to be bound at definition time (when the module is imported). Any subsequent assignment to
pdb.line_prefixby the user is ignored by this function.Fix
Change the default argument to
Noneand assign it inside the function body.CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs