summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-08-22 14:51:58 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-08-22 14:51:58 (GMT)
commit06ce077e4327e35f5a198b143d9d95a00abb782a (patch)
treea8b9e17c4fe83b256ead185f7ca97aaec8ca3847 /Lib/tkinter
parent203eb317d23a1b7dcdf5ca3131df7008e251d423 (diff)
downloadcpython-06ce077e4327e35f5a198b143d9d95a00abb782a.zip
cpython-06ce077e4327e35f5a198b143d9d95a00abb782a.tar.gz
cpython-06ce077e4327e35f5a198b143d9d95a00abb782a.tar.bz2
Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6.
Diffstat (limited to 'Lib/tkinter')
-rw-r--r--Lib/tkinter/__init__.py8
-rw-r--r--Lib/tkinter/test/test_ttk/test_widgets.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index f619786..2191ca7 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -1352,7 +1352,7 @@ class Misc:
value = words[i+1]
if not value:
value = None
- elif '.' in value:
+ elif '.' in str(value):
value = getdouble(value)
else:
value = getint(value)
@@ -1921,7 +1921,7 @@ class Pack:
for i in range(0, len(words), 2):
key = words[i][1:]
value = words[i+1]
- if value[:1] == '.':
+ if str(value)[:1] == '.':
value = self._nametowidget(value)
dict[key] = value
return dict
@@ -1972,7 +1972,7 @@ class Place:
for i in range(0, len(words), 2):
key = words[i][1:]
value = words[i+1]
- if value[:1] == '.':
+ if str(value)[:1] == '.':
value = self._nametowidget(value)
dict[key] = value
return dict
@@ -2021,7 +2021,7 @@ class Grid:
for i in range(0, len(words), 2):
key = words[i][1:]
value = words[i+1]
- if value[:1] == '.':
+ if str(value)[:1] == '.':
value = self._nametowidget(value)
dict[key] = value
return dict
diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/tkinter/test/test_ttk/test_widgets.py
index 45a686a..890787b 100644
--- a/Lib/tkinter/test/test_ttk/test_widgets.py
+++ b/Lib/tkinter/test/test_ttk/test_widgets.py
@@ -105,7 +105,7 @@ class CheckbuttonTest(unittest.TestCase):
cbtn['command'] = ''
res = cbtn.invoke()
- self.assertEqual(res, '')
+ self.assertEqual(str(res), '')
self.assertFalse(len(success) > 1)
self.assertEqual(cbtn['offvalue'],
cbtn.tk.globalgetvar(cbtn['variable']))
@@ -453,7 +453,7 @@ class RadiobuttonTest(unittest.TestCase):
cbtn2['command'] = ''
res = cbtn2.invoke()
- self.assertEqual(res, '')
+ self.assertEqual(str(res), '')
self.assertFalse(len(success) > 1)
self.assertEqual(cbtn2['value'], myvar.get())
self.assertEqual(myvar.get(),