mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Closes #13258: Use callable() built-in in the standard library.
This commit is contained in:
parent
f99e4b5dbe
commit
5d1155c08e
25 changed files with 48 additions and 51 deletions
|
@ -705,7 +705,7 @@ class Option:
|
|||
|
||||
def _check_callback(self):
|
||||
if self.action == "callback":
|
||||
if not hasattr(self.callback, '__call__'):
|
||||
if not callable(self.callback):
|
||||
raise OptionError(
|
||||
"callback not callable: %r" % self.callback, self)
|
||||
if (self.callback_args is not None and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue