summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-01-01 21:08:18 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-01-01 21:08:18 (GMT)
commitf5d902fc4763f7c5142a2be4c3ef62f2b8b29289 (patch)
treed3d933ed700b063f38e018b00688427462752483 /Lib
parent17cb5cf403c1a6da312588f6c8d076a249d59d08 (diff)
downloadcpython-f5d902fc4763f7c5142a2be4c3ef62f2b8b29289.zip
cpython-f5d902fc4763f7c5142a2be4c3ef62f2b8b29289.tar.gz
cpython-f5d902fc4763f7c5142a2be4c3ef62f2b8b29289.tar.bz2
Always convert Text.index result to string.
This improves compatibility with Tcl 8.5, which would otherwise return textindex objects.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/lib-tk/Tkinter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index f3f99f4..3ec3407 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -2981,7 +2981,7 @@ class Text(Widget):
return self.tk.call(self._w, "image", "names")
def index(self, index):
"""Return the index in the form line.char for INDEX."""
- return self.tk.call(self._w, 'index', index)
+ return str(self.tk.call(self._w, 'index', index))
def insert(self, index, chars, *args):
"""Insert CHARS before the characters at INDEX. An additional
tag can be given in ARGS. Additional CHARS and tags can follow in ARGS."""