mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
replace callable()
This commit is contained in:
parent
0c8bee6393
commit
de0559998f
7 changed files with 18 additions and 18 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue