Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pdb.line_prefix assignment ignored due to early binding #141781

Closed
Labels
stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@pareshjoshij

Description

@pareshjoshij

Bug Description

, inpdb.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 topdb.line_prefix by the user is ignored by this function.

Fix

Change the default argument toNone 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

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp