Commit 19392e44 authored by Guido van Rossum's avatar Guido van Rossum

Remove garbage '+ ' and reformat tag_delete function budy

parent 42313509
...@@ -610,7 +610,7 @@ class Widget(Misc, Pack, Place): ...@@ -610,7 +610,7 @@ class Widget(Misc, Pack, Place):
apply(self.tk.call, (widgetName, self._w) + extra) apply(self.tk.call, (widgetName, self._w) + extra)
Widget.config(self, cnf) Widget.config(self, cnf)
def config(self, cnf=None): def config(self, cnf=None):
+ cnf = _cnfmerge(cnf) cnf = _cnfmerge(cnf)
if cnf is None: if cnf is None:
cnf = {} cnf = {}
for x in self.tk.split( for x in self.tk.split(
...@@ -1076,8 +1076,7 @@ class Text(Widget): ...@@ -1076,8 +1076,7 @@ class Text(Widget):
(self._w, 'tag', 'configure', tagName) (self._w, 'tag', 'configure', tagName)
+ self._options(cnf)) + self._options(cnf))
def tag_delete(self, *tagNames): def tag_delete(self, *tagNames):
apply(self.tk.call, (self._w, 'tag', 'delete') apply(self.tk.call, (self._w, 'tag', 'delete') + tagNames)
+ tagNames)
def tag_lower(self, tagName, belowThis=None): def tag_lower(self, tagName, belowThis=None):
self.tk.call(self._w, 'tag', 'lower', self.tk.call(self._w, 'tag', 'lower',
tagName, belowThis) tagName, belowThis)
......
...@@ -610,7 +610,7 @@ class Widget(Misc, Pack, Place): ...@@ -610,7 +610,7 @@ class Widget(Misc, Pack, Place):
apply(self.tk.call, (widgetName, self._w) + extra) apply(self.tk.call, (widgetName, self._w) + extra)
Widget.config(self, cnf) Widget.config(self, cnf)
def config(self, cnf=None): def config(self, cnf=None):
+ cnf = _cnfmerge(cnf) cnf = _cnfmerge(cnf)
if cnf is None: if cnf is None:
cnf = {} cnf = {}
for x in self.tk.split( for x in self.tk.split(
...@@ -1076,8 +1076,7 @@ class Text(Widget): ...@@ -1076,8 +1076,7 @@ class Text(Widget):
(self._w, 'tag', 'configure', tagName) (self._w, 'tag', 'configure', tagName)
+ self._options(cnf)) + self._options(cnf))
def tag_delete(self, *tagNames): def tag_delete(self, *tagNames):
apply(self.tk.call, (self._w, 'tag', 'delete') apply(self.tk.call, (self._w, 'tag', 'delete') + tagNames)
+ tagNames)
def tag_lower(self, tagName, belowThis=None): def tag_lower(self, tagName, belowThis=None):
self.tk.call(self._w, 'tag', 'lower', self.tk.call(self._w, 'tag', 'lower',
tagName, belowThis) tagName, belowThis)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment