Backport of r59654.

Issue #4342: Always convert Text.index result to string.
This commit is contained in:
Martin v. Löwis 2008-12-13 15:04:58 +00:00
parent 8a64048a22
commit afb0dabaca
2 changed files with 3 additions and 1 deletions

View file

@ -3005,7 +3005,7 @@ class Text(Widget):
return self.tk.call(self._w, "image", "names") return self.tk.call(self._w, "image", "names")
def index(self, index): def index(self, index):
"""Return the index in the form line.char for 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): def insert(self, index, chars, *args):
"""Insert CHARS before the characters at INDEX. An additional """Insert CHARS before the characters at INDEX. An additional
tag can be given in ARGS. Additional CHARS and tags can follow in ARGS.""" tag can be given in ARGS. Additional CHARS and tags can follow in ARGS."""

View file

@ -109,6 +109,8 @@ Core and builtins
Library Library
------- -------
- Issue #4342: Always convert Text.index result to string.
- Issue 3248: Allow placing ScrolledText in a PanedWindow. - Issue 3248: Allow placing ScrolledText in a PanedWindow.
- Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to - Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to