Skip to content

duplicate input() prompts in REPL #149421

Closed as duplicate
Closed as duplicate

Description

@KuRRe8

Bug report

Bug description:

In the mainpage of https://www.python.org/, there is an example code block.

# Simple output (with Unicode)
>>> print("Hello, I'm Python!")
Hello, I'm Python!

# Input, assignment
>>> name = input('What is your name?\n')
>>> print(f'Hi, {name}.')
What is your name?
Python
Hi, Python.

when I try it in the embeded python in https://www.python.org/, it behaves strange

Python 3.13.1 (main, Jan 16 2025, 13:50:41) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> name = input('What is your name?\n')
What is your name?
What is your name?
What is your name?
What is your name?
What is your name?
What is your name?
What is your name?
python
>>> 

that is, whenever I press a key it prompts once.

Then I tried it in Win10 + pwsh + Windows Terminal + python3.15.0a7

PS A:\> python3.15t.exe
Python 3.15.0a7 free-threading build (main, Mar 10 2026, 18:28:44) [MSC v.1950 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> name = input('What is your name?\n')
What is your name?
What is your name?
What is your name?
What is your name?
bob
>>> import sys
>>> sys.version
'3.15.0a7 free-threading build (main, Mar 10 2026, 18:28:44) [MSC v.1950 64 bit (AMD64)]'
>>>

I'm not sure if this issue is tracked or fixed since I dont see related results in issue page. I also tried it in Windows10 + WindowsTerminal + WSL2 + Ubuntu 24.04. It performs good either of version 3.12.3 or 3.15.0a8(build from source)

CPython versions tested on:

3.15

Operating systems tested on:

Windows

Activity

  1. added
    type-bug
    on May 5, 2026
  2. added
    stdlib
    topic-repl
    on May 5, 2026
  3. tanloong commented on May 5, 2026

    @tanloong
    Contributor

    This issue is a duplicate of #127068. There is an open PR for it: #142817.

  4. StanFromIreland commented on May 5, 2026

    @StanFromIreland
    Member

    Thanks @tanloong !

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibtopic-repltype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions