Describe the bug
The is_callable function is supposed to check that an object is callable, for example to add it as a button action. There are two problems with it:
There is already a builtin to do this: callable.
The is_callable function is more restrictive than callable: it only allows functions, methods and partial objects. It does not allow objects with a __call__ method, for no particular reason.
I think that unless there is a powerful reason not to, the is_callable function should be replaced by the callable builtin.
Describe the bug The
is_callable
function is supposed to check that an object is callable, for example to add it as a button action. There are two problems with it:callable
.is_callable
function is more restrictive thancallable
: it only allows functions, methods andpartial
objects. It does not allow objects with a__call__
method, for no particular reason.I think that unless there is a powerful reason not to, the
is_callable
function should be replaced by thecallable
builtin.