summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk/Tkinter.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-10-09 22:05:45 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-10-09 22:05:45 (GMT)
commitde0559998fef231efc9ecbdef5b3a195d4eaa28d (patch)
tree235b05866ae52f80d81f2953c663d74f1de6dae1 /Lib/lib-tk/Tkinter.py
parent0c8bee639368324b750176ee171cadd33847f18e (diff)
downloadcpython-de0559998fef231efc9ecbdef5b3a195d4eaa28d.zip
cpython-de0559998fef231efc9ecbdef5b3a195d4eaa28d.tar.gz
cpython-de0559998fef231efc9ecbdef5b3a195d4eaa28d.tar.bz2
replace callable()
Diffstat (limited to 'Lib/lib-tk/Tkinter.py')
-rw-r--r--Lib/lib-tk/Tkinter.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 46b2781..4dcb256 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -1047,7 +1047,7 @@ class Misc:
for k, v in cnf.items():
if v is not None:
if k[-1] == '_': k = k[:-1]
- if callable(v):
+ if hasattr(v, '__call__'):
v = self._register(v)
elif isinstance(v, (tuple, list)):
nv = []
@@ -3194,7 +3194,7 @@ class Image:
elif kw: cnf = kw
options = ()
for k, v in cnf.items():
- if callable(v):
+ if hasattr(v, '__call__'):
v = self._register(v)
options = options + ('-'+k, v)
self.tk.call(('image', 'create', imgtype, name,) + options)
@@ -3217,7 +3217,7 @@ class Image:
for k, v in _cnfmerge(kw).items():
if v is not None:
if k[-1] == '_': k = k[:-1]
- if callable(v):
+ if hasattr(v, '__call__'):
v = self._register(v)
res = res + ('-'+k, v)
self.tk.call((self.name, 'config') + res)