[Python-3000-checkins] r63915 - python/branches/py3k/Lib/tkinter/__init__.py
georg.brandl
python-3000-checkins at python.org
Tue Jun 3 12:25:48 CEST 2008
Author: georg.brandl
Date: Tue Jun 3 12:25:47 2008
New Revision: 63915
Log:
Fix Tkinter sequence passing. #2906.
Modified:
python/branches/py3k/Lib/tkinter/__init__.py
Modified: python/branches/py3k/Lib/tkinter/__init__.py
==============================================================================
--- python/branches/py3k/Lib/tkinter/__init__.py (original)
+++ python/branches/py3k/Lib/tkinter/__init__.py Tue Jun 3 12:25:47 2008
@@ -1052,11 +1052,16 @@
if hasattr(v, '__call__'):
v = self._register(v)
elif isinstance(v, (tuple, list)):
+ nv = []
for item in v:
- if not isinstance(item, (str, int)):
+ if isinstance(item, int):
+ nv.append(str(item))
+ elif isinstance(item, str):
+ nv.append(('{%s}' if ' ' in item else '%s') % item)
+ else:
break
else:
- v = ' '.join(map(str, v))
+ v = ' '.join(nv)
res = res + ('-'+k, v)
return res
def nametowidget(self, name):
More information about the Python-3000-checkins
mailing list