Guilherme Polo <ggp...@gmail.com> added the comment: I hope you are not too bored for me commenting on this again.
So, I have re-though about this issue today and decided to solve it differently (and will include a patch here this time, don't worry about mentions to external repo this time). To solve the problem I replaced the tk.call method in the Tk so it can remove registered commands in the call in case it fails. The other problems reported in this issue are also solved by it, and others that weren't reported are too: Misc.selection_handle (just to name one, but there are others) could leave a undesired item in _tclCommands too. Another advantage of this solution is that extensions benefit from it, and they do not need to change their code (except if they are using a collection of internal functions, which they shouldn't, affected by this patch). Added file: http://bugs.python.org/file12427/keep_tclcommands_correct.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1524639> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com