-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
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
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error