Skip to content

[print()] did not print all the the numbers expected #138689

Closed as duplicate
Closed as duplicate

Description

@2930627136

Bug report

Bug description:

the output is wrong:
Image
should be 1,2,3,4,5,6,7,8,9,

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Activity

  1. skirpichev commented on Sep 9, 2025

    @skirpichev
    Member

    I can't reproduce this on Linux, that's what I see:

    >>> a=1
    >>> a
    1
    >>> while a<10:
    ...     print(a, end=',')
    ...     a+=1
    ...     
    1,2,3,4,5,6,7,8,9,>>> 

    Are you using new REPL? Could you please try to reproduce with PYTHON_BASIC_REPL environment variable set? (I.e. with old repl.)

  2. added
    pendingThe issue will be closed if no feedback is provided
    topic-replRelated to the interactive shell
    on Sep 9, 2025
  3. JanEricNitschke commented on Sep 9, 2025

    @JanEricNitschke
    Contributor

    I can reproduce it on windows:

    C:\Windows\system32>uv run --python 3.13 python
    Python 3.13.1 (main, Jan 14 2025, 22:47:35) [MSC v.1942 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> a=1
    >>> a
    1
    >>> while a<10:
    ...     print(a,end=',')
    ...     a+=1
    ...
    >>> 3,4,5,6,7,8,9,
    
    
    Image

    Old repl works:

    C:\Windows\system32>set PYTHON_BASIC_REPL=1
    
    C:\Windows\system32>uv run --python 3.13 python
    Python 3.13.1 (main, Jan 14 2025, 22:47:35) [MSC v.1942 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> a=1
    >>> a
    1
    >>> while a<10:
    ...     print(a, end=',')
    ...     a+=1
    ...
    1,2,3,4,5,6,7,8,9,>>>
    
    
    
    Image
  4. added and removed
    pendingThe issue will be closed if no feedback is provided
    on Sep 9, 2025
  5. JanEricNitschke commented on Sep 9, 2025

    @JanEricNitschke
    Contributor

    Also still there in 3.14:

    C:\Windows\system32>uv run --python 3.14.0a4 python
    Python 3.14.0a4 (main, Jan 14 2025, 22:47:21) [MSC v.1942 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> a=1
    >>> a
    1
    >>> while a<10:
    ...     print(a, end=',')
    ...     a+=1
    ...
    >>> 3,4,5,6,7,8,9,
    
    
    

    and current main:

    PS D:\Programming\Projects\cpython> .\PCbuild\amd64\python_d.exe
    Python 3.15.0a0 (heads/main-dirty:5edfe55acf, Sep  9 2025, 07:47:38) [MSC v.1944 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> a=1
    >>> a
    1
    >>> while a<10:
    ...     print(a, end=',')
    ...     a+=1
    ...
    >>> 3,4,5,6,7,8,9,
    
    
  6. sergey-miryanov commented on Sep 9, 2025

    @sergey-miryanov
    Contributor

    I believe it is known issue - #128067

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

    OS-windowstopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions