[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2020-05-26 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.10 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2020-01-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, given that the code did not match the docstring and that we are changing the code to match the clarified docstring, should we consider this a bugfix, and, should we backport it? -- ___ Python tracker

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2020-01-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, if I understand your last message (msg302299), the docstring should read: Unbind for this widget the event SEQUENCE. If FUNCID is given, only unbind the function identified with FUNCID and also delete that command. The main doc c

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2020-01-11 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +17364 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17954 ___ Python tracker ___ __

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2020-01-05 Thread Giovanni Lombardo
Giovanni Lombardo added the comment: I propose the below fix: ``` def unbind(self, sequence, funcid=None): """Unbind for this widget for event SEQUENCE the function identified with FUNCID.""" bound = '' if funcid: self.deletecommand(funcid)

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2019-12-10 Thread Giovanni Lombardo
Giovanni Lombardo added the comment: http://docs.python.org/devguide/triaging.html#assigned-to -- nosy: +glombardo ___ Python tracker ___ _

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2017-09-18 Thread Juliette Monsel
Juliette Monsel added the comment: I don't mind writing a patch and opening a pull request, however I don't know which corner cases I need to take into account. -- ___ Python tracker _

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2017-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think a new method is needed. We can make unbind() destroying all bindings if FUNCID is not given (note that registered commands are leaked in this case), and only the specified command if it is specified. We can add a boolean parameter (similar to t

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2017-09-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: The unbind docstring, "Unbind for this widget for event SEQUENCE the function identified with FUNCID" implies to me the behavior Juliette expected. The NMT reference unpacks this to two sentences. Reading the code self.tk.call('bind', self._w, sequence

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2017-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Tk do not provide a way of unbinding a specific command. It supports binding a script with replacing an existing binding, appending a script to an existing binding, and destroying an existing binding. Unbinding a specific command can be implemented in Python

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2017-09-15 Thread Juliette Monsel
Juliette Monsel added the comment: I have found a workaround to unbind a single binding (inspired by https://mail.python.org/pipermail/tkinter-discuss/2012-May/003151.html): def unbind(widget, seq, funcid): bindings = {x.split()[1][3:]: x for x in widget.bind(seq).splitlines() if x.strip()

[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2017-09-15 Thread Juliette Monsel
New submission from Juliette Monsel: I am using python 3.6.2 with tk 8.6.7 in Linux and when I call widget.unbind(, funcid), it unbinds all bindings for , 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