-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesstdlibPython modules in the Lib dirPython modules in the Lib dirtopic-replRelated to the interactive shellRelated to the interactive shelltopic-tkintertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Here is an interactive python 3.13 session on macOS 15.5 using the python.org distribution:
Python 3.13.3 (v3.13.3:6280bb54784, Apr 8 2025, 10:47:54) [Clang 15.0.0 (clang-1500.3.9.4)] on d\
arwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> interp = tkinter.Tk()
>>> f = tkinter.Frame(interp, background='blue', width=30, height=30)
>>> f.pack(padx=30, pady=30)
>>> def handler(event):
... print("Click")
...
>>> f.bind('<Button-1>', handler)
'4384102400handler'
>>> # Now click the mouse on the blue square a few times.
>>> Click
Click
Click
Click
Click
The words "Click" should not be indented. No spaces are being printed. The REPL behaves as if the text is ended with a newline but not with the implicit carriage return.
I expect the print command to behave the same way as it does here:
>>> for i in range(5): print("Click")
...
Click
Click
Click
Click
Click
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesstdlibPython modules in the Lib dirPython modules in the Lib dirtopic-replRelated to the interactive shellRelated to the interactive shelltopic-tkintertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error