This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author j-4321-i
Recipients j-4321-i
Date 2017-09-15.13:57:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505483834.38.0.808110743528.issue31485@psf.upfronthosting.co.za>
In-reply-to
Content
I am using python 3.6.2 with tk 8.6.7 in Linux and when I call widget.unbind(<Sequence>, funcid), it unbinds all bindings for <Sequence>, while I would expect it to unbind only funcid. Here is an example reproducing the problem:


import tkinter as tk

root = tk.Tk()

def cmd1(event):
    print('1')

def cmd2(event):
    print('2')

def unbind1():
    l.unbind('<Motion>', b1)

def unbind2():
    l.unbind('<Motion>', b2)

l = tk.Label(root, text='Hover')

b1 = l.bind('<Motion>', cmd1)
b2 = l.bind('<Motion>', cmd2, True)

l.pack()
tk.Button(root, text='Unbind 1', command=unbind1).pack()
tk.Button(root, text='Unbind 2', command=unbind2).pack()

root.mainloop()


In this example, clicking on one of the buttons unbinds both bindings instead of only one.
History
Date User Action Args
2017-09-15 13:57:14j-4321-isetrecipients: + j-4321-i
2017-09-15 13:57:14j-4321-isetmessageid: <1505483834.38.0.808110743528.issue31485@psf.upfronthosting.co.za>
2017-09-15 13:57:14j-4321-ilinkissue31485 messages
2017-09-15 13:57:14j-4321-icreate