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
    type-feature
    on Oct 20, 2026
  3. added
    stdlib
    on Oct 20, 2026
  4. gaogaotiantian commented on Oct 20, 2026

    @gaogaotiantian
    Member

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

  5. johnslavik commented on Oct 20, 2026

    @johnslavik
    MemberAuthor

    @gaogaotiantian Yeah I'm working on it!

  6. added
    topic-repl
    on Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

sprintstdlibtopic-repltype-feature

Projects

  • Status
    Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions