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

Use 4 spaces for indentation in PDB #125377

Closed
Assignees
gaogaotiantian
Labels
stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement
@treyhunner

Description

@treyhunner

Feature or enhancement

Proposal:

It looks like PDB evolved the ability to handle multi-line Python expressions in Python 3.13. I didn't see this mentioned inthe release notes, but I'm excited to see this feature. Thank you to whoever added this feature! (@gaogaotiantian maybe?)

I did notice that the Tab key works in a somewhat unexpected way.

When I hit Enter at the end of anif True: line, I see:

image

Then if I hit the Tab key I see this:

image

Note that a tab character is inserted (just as one would be within the old Python REPL) but the tab width looks like 2 spaces.

I expected to see this instead:

image

In the old Python REPL, the Tab key used to insert a tab character, but itlooked like 4 spaces were inserted because the tab stop happened to be 4 characters from the end of the>>> prompt (which is 4 characters long):

image

One way to resolve this would be to shorten the PDB prompt to something like(P) orPDB.

I would propose instead that the Tab key should insert 4 spaces in PDB (just as the new REPL does).

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp