summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/lib-tk/Tkinter.py8
-rwxr-xr-xLib/tkinter/Tkinter.py8
2 files changed, 12 insertions, 4 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 9d5fa6f..2c47480 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -43,8 +43,12 @@ def _cnfmerge(cnfs):
else:
cnf = {}
for c in _flatten(cnfs):
- for k, v in c.items():
- cnf[k] = v
+ try:
+ cnf.update(c)
+ except (AttributeError, TypeError), msg:
+ print "_cnfmerge: fallback due to:", msg
+ for k, v in c.items():
+ cnf[k] = v
return cnf
class Event:
diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py
index 9d5fa6f..2c47480 100755
--- a/Lib/tkinter/Tkinter.py
+++ b/Lib/tkinter/Tkinter.py
@@ -43,8 +43,12 @@ def _cnfmerge(cnfs):
else:
cnf = {}
for c in _flatten(cnfs):
- for k, v in c.items():
- cnf[k] = v
+ try:
+ cnf.update(c)
+ except (AttributeError, TypeError), msg:
+ print "_cnfmerge: fallback due to:", msg
+ for k, v in c.items():
+ cnf[k] = v
return cnf
class Event: