Python 3.14 REPL sometimes breaks when editing code blocks #135185
Labels
stdlib
Python modules in the Lib dir
topic-repl
Related to the interactive shell
type-bug
An unexpected behavior, bug, or error
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
This has happened to me three times now over the past few weeks and I have not yet been able to reliable reproduce the issue.
The most recent time, I had entered this function into the REPL (typing it all out manually):
I hit the up arrow on my keyboard and I tried to delete the
if
line withCtrl+K
at the start of theif
.That then immediately showed this error:
Note that I did not try to run this block of code. I was simply editing it. The syntax simply became temporarily invalid while editing.
I have tried to reproduce this in the same REPL environment using a different function name and I can't seem to do so. If I edit the exact code block in history that produced the error, I see the same exception again. However, if I try to rewrite the same function with a different name and then attempt to edit it, I don't see the error again.
CPython versions tested on:
3.14
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: