replace callable()

This commit is contained in:
Benjamin Peterson 2009-10-09 22:05:45 +00:00
parent 0c8bee6393
commit de0559998f
7 changed files with 18 additions and 18 deletions

View file

@ -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)