diff options
author | Guido van Rossum <guido@python.org> | 1998-04-29 22:16:57 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-04-29 22:16:57 (GMT) |
commit | dc59340646d1e568b10d467fa55b4839d3aa2ae9 (patch) | |
tree | 90b8e30661587342ff5defe6e9ceeebeb8157910 | |
parent | f975699c0767ac02f0e50cd45023080799e98b5e (diff) | |
download | cpython-dc59340646d1e568b10d467fa55b4839d3aa2ae9.zip cpython-dc59340646d1e568b10d467fa55b4839d3aa2ae9.tar.gz cpython-dc59340646d1e568b10d467fa55b4839d3aa2ae9.tar.bz2 |
In _bind(), found a way to test for break without a temp variable.
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 9291ab5..4a94c38 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -457,11 +457,11 @@ class Misc: if func: funcid = self._register(func, self._substitute, needcleanup) - cmd = ("%sset _tkinter_break [%s %s]\n" - 'if {"$_tkinter_break" == "break"} break\n') \ - % (add and '+' or '', - funcid, - _string.join(self._subst_format)) + cmd = ('%sif {"[%s %s]" == "break"} break\n' + % + (add and '+' or '', + funcid, + _string.join(self._subst_format))) self.tk.call(what + (sequence, cmd)) return funcid elif func == '': |