New submission from Terry J. Reedy: Report and code from George Trojan on python-list.
import tkinter class GUI(tkinter.Tk): def __init__(self): tkinter.Tk.__init__(self) frame = tkinter.Frame(self) for tag in ('A', 'B'): w = tkinter.Checkbutton(frame, text=tag) w.pack(side='top', padx=10, pady=10) print(w) frame.pack(side='top') frame = tkinter.Frame(self) for tag in ('C', 'D'): w = tkinter.Checkbutton(frame, text=tag) w.pack(side='top', padx=10, pady=10) print(w) frame.pack(side='top') gui = GUI() gui.mainloop() In 3.5, each Checkbutton has unique last name component. .2028654224384.2028654606600 .2028654224384.2028654608224 .2028654606656.2028654606824 .2028654606656.2028654608336 Clicking any box checks or unchecks exactly that box. In 3.6, last name components are duplicated .!frame.!checkbutton .!frame.!checkbutton2 .!frame2.!checkbutton .!frame2.!checkbutton2 Clicking any box checks or unchecks both button with 'same name'. I verified that the _w strings passed in tk.call are the full unique names. MRAB reported that adding a tk variable attribute fixed the problem. I notice that Brian Oakley said the same thing in the similar issue #25684, though that is marked for 2.7 and 3.5 also. ---------- keywords: 3.6regression messages: 286552 nosy: serhiy.storchaka, terry.reedy priority: normal severity: normal stage: test needed status: open title: Problem with Checkbutton and duplicate last name components type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29402> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com