mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
Fix Tkinter sequence passing. #2906.
This commit is contained in:
parent
807a19608a
commit
3b55003e33
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user