Bug report
Bug description:
With #133883 merged, hitting ctrl+d at the start of a blank line in a multi-line entry causes the existing code to be evaluated in both the new REPL and the basic REPL:
>>> def foo(x):
...
File "<python-input-0>", line 1
def foo(x):
^
IndentationError: expected an indented block after function definition on line 1
But code.interact() exits immediately without executing the existing code:
>>> def foo(x):
...
now exiting InteractiveConsole...
I doubt this is terribly impactful, but I think it would still be nice to have these behave the same way.
I have a patch ready that I think will resolve this, so I'll open a PR shortly.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
With #133883 merged, hitting ctrl+d at the start of a blank line in a multi-line entry causes the existing code to be evaluated in both the new REPL and the basic REPL:
But
code.interact()exits immediately without executing the existing code:I doubt this is terribly impactful, but I think it would still be nice to have these behave the same way.
I have a patch ready that I think will resolve this, so I'll open a PR shortly.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
code.interactMatch REPL Behavior on ctrl+d in Multiline Entry #139876