]> granicus.if.org Git - python/commitdiff
Backport of r59654.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 13 Dec 2008 15:04:58 +0000 (15:04 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 13 Dec 2008 15:04:58 +0000 (15:04 +0000)
Issue #4342: Always convert Text.index result to string.

Lib/lib-tk/Tkinter.py
Misc/NEWS

index de2873fc3c88ce13145ac32c07f370b69e8a9fc7..31a2fc36d2d56039f224eb7d5c9001eeac6dd9df 100644 (file)
@@ -3005,7 +3005,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."""
index b83c73169c9466ab8499c51ded5e33f7cec2130f..99e385a0ebf437a2e1a04e2efd7945de43c7320d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -109,6 +109,8 @@ Core and builtins
 Library
 -------
 
+- Issue #4342: Always convert Text.index result to string.
+
 - Issue 3248: Allow placing ScrolledText in a PanedWindow.
 
 - Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to