summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-07-30 12:22:12 (GMT)
committerGuido van Rossum <guido@python.org>1999-07-30 12:22:12 (GMT)
commit42b334d93d0454f12eb249805049b75d2bd6dc07 (patch)
tree8b159c7573bdc73e6936fabf9a8cddd4b0027d01 /Lib/lib-tk
parenteac8abee4ecec2e88e0e3ad18b32de250e48a44a (diff)
downloadcpython-42b334d93d0454f12eb249805049b75d2bd6dc07.zip
cpython-42b334d93d0454f12eb249805049b75d2bd6dc07.tar.gz
cpython-42b334d93d0454f12eb249805049b75d2bd6dc07.tar.bz2
Remove some redundant code from Canvas.tag_bind(), which added all
bindings to a dictionary _tagcommands which was otherwise unused. (This was checked in accidentally with rev. 1.125 and not deleted with rev. 1.127 when the other half of this code was removed -- although even as originally checked in the _tagcommands variable was never used.) (PR#40, reported by Peter Stoehr)
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/Tkinter.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 3eeee5c..8d06ef1 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -1158,7 +1158,6 @@ def At(x, y=None):
return '@' + `x` + ',' + `y`
class Canvas(Widget):
- _tagcommands = None
def __init__(self, master=None, cnf={}, **kw):
Widget.__init__(self, master, 'canvas', cnf, kw)
def addtag(self, *args):
@@ -1185,16 +1184,8 @@ class Canvas(Widget):
if funcid:
self.deletecommand(funcid)
def tag_bind(self, tagOrId, sequence=None, func=None, add=None):
- res = self._bind((self._w, 'bind', tagOrId),
- sequence, func, add)
- if sequence and func and res:
- # remember the funcid for later
- if self._tagcommands is None:
- self._tagcommands = {}
- list = self._tagcommands.get(tagOrId) or []
- self._tagcommands[tagOrId] = list
- list.append(res)
- return res
+ return self._bind((self._w, 'bind', tagOrId),
+ sequence, func, add)
def canvasx(self, screenx, gridspacing=None):
return getdouble(self.tk.call(
self._w, 'canvasx', screenx, gridspacing))