Skip to content

Support multi-statement prompts in PDB REPL #159887

Open

Description

@johnslavik

Feature or enhancement

Current vs expected:

 (Pdb) class A:
 ...       pass
 ...
 ...   class B(A):
 ...       pass
 ...
 ...   B()
 ...
-*** SyntaxError: invalid syntax
+<__main__.B object at 0x107affce0>

(Whereas the main interactive REPL supports multi-class one-turn prompts from the user).

Found during stress-testing #157612 and discussed with @gaogaotiantian.

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

Activity

  1. self-assigned this
    on Oct 20, 2026
  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Oct 20, 2026
  3. gaogaotiantian commented on Oct 20, 2026

    @gaogaotiantian
    Member

    I figure you want to work on this yourself @johnslavik ?

  4. johnslavik commented on Oct 20, 2026

    @johnslavik
    MemberAuthor

    @gaogaotiantian Yeah I'm working on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

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

Projects

  • Status
    Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions