You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the input prompt has 1 or more newline characters, the text preceding the last \n is printed again when a character is typed in by the user. Every subsequent character typed in by the user after the second also leads to text preceding the last \n to be reprinted. (i.e., 2 characters inputted -> prompt repeated 1 time, 3 characters inputted -> prompt repeated 2 times, etc.)
This does not occur on 3.12, only 3.13+, and only on the REPL, not when running a script.
A similar issue also occurs when using \t in the input prompt:
>>>input("a\t:")
aa :b'b'
This is slightly different from the newline case - the text is repeated only once regardless of the number of characters in the input.
Bug report
Bug description:
When the input prompt has 1 or more newline characters, the text preceding the last
\nis printed again when a character is typed in by the user. Every subsequent character typed in by the user after the second also leads to text preceding the last\nto be reprinted. (i.e., 2 characters inputted -> prompt repeated 1 time, 3 characters inputted -> prompt repeated 2 times, etc.)This does not occur on 3.12, only 3.13+, and only on the REPL, not when running a script.
A similar issue also occurs when using
\tin the input prompt:This is slightly different from the newline case - the text is repeated only once regardless of the number of characters in the input.
Screen.Recording.2025-11-29.at.1.54.19.PM.mov
CPython versions tested on:
3.13, 3.14
Operating systems tested on:
macOS, Linux