]> granicus.if.org Git - python/commitdiff
Don't require leading '-' on option name to Text.tag_cget
authorGuido van Rossum <guido@python.org>
Mon, 11 Nov 1996 19:10:58 +0000 (19:10 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 11 Nov 1996 19:10:58 +0000 (19:10 +0000)
Lib/lib-tk/Tkinter.py
Lib/tkinter/Tkinter.py

index e18c05efa0d1e9ee7314d170aa386e559df6f1e8..5dd0c99b186f0cc9101731f9e75573ccd1c5fb33 100644 (file)
@@ -1464,6 +1464,10 @@ class Text(Widget):
                return self._bind((self._w, 'tag', 'bind', tagName),
                                  sequence, func, add)
        def tag_cget(self, tagName, option):
+               if option[:1] != '-':
+                       option = '-' + option
+               if option[-1:] == '_':
+                       option = option[:-1]
                return self.tk.call(self._w, 'tag', 'cget', tagName, option)
        def tag_config(self, tagName, cnf={}, **kw):
                if type(cnf) == StringType:
index e18c05efa0d1e9ee7314d170aa386e559df6f1e8..5dd0c99b186f0cc9101731f9e75573ccd1c5fb33 100755 (executable)
@@ -1464,6 +1464,10 @@ class Text(Widget):
                return self._bind((self._w, 'tag', 'bind', tagName),
                                  sequence, func, add)
        def tag_cget(self, tagName, option):
+               if option[:1] != '-':
+                       option = '-' + option
+               if option[-1:] == '_':
+                       option = option[:-1]
                return self.tk.call(self._w, 'tag', 'cget', tagName, option)
        def tag_config(self, tagName, cnf={}, **kw):
                if type(cnf) == StringType: