Skip to content

print(c, end="") doesn't seem to work consistently across Python versions on Windows? #142467

@JasonMendoza2008

Description

@JasonMendoza2008

Bug report

Bug description:

Define a class like so:

class C:
    def __init__(self):
        pass
    def __str__(self):
        return "C"

Instantiate it c = C() and do print(c, end="").

On Python 3.14.1 (tags/v3.14.1:57e0d17, Dec 2 2025, 14:05:07) [MSC v.1944 64 bit (AMD64)] on win32, nothing gets printed (but print(c) works):
Image

On Python 3.12.5 (tags/v3.12.5:ff3bc82, Aug 6 2024, 20:45:27) [MSC v.1940 64 bit (AMD64)] on win32 everything seems fine and works as I would've expected:

Image

Maybe it's not a bug and I'm just stupid? Sorry if that's the case..

Operating systems tested on:

Windows

Note

I'm not using any IDE, I'm just double clicking on the corresponding python.exe. Yes my 3.12 is outdated, but it has the "correct" behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions