projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
807a196
)
Fix Tkinter sequence passing. #2906.
author
Georg Brandl
<georg@python.org>
Tue, 3 Jun 2008 10:25:47 +0000
(10:25 +0000)
committer
Georg Brandl
<georg@python.org>
Tue, 3 Jun 2008 10:25:47 +0000
(10:25 +0000)
Lib/tkinter/__init__.py
patch
|
blob
|
history
diff --git
a/Lib/tkinter/__init__.py
b/Lib/tkinter/__init__.py
index 24badd81a1e81b5786d23717786228ec8ae25a8b..07eb7574ac87624c7b98cd17f056258462916e98 100644
(file)
--- a/
Lib/tkinter/__init__.py
+++ b/
Lib/tkinter/__init__.py
@@
-1052,11
+1052,16
@@
class Misc:
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):