mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
isinstance(f, collections.Callable) is more correct
This commit is contained in:
parent
5850389a10
commit
36e0d0efd8
1 changed files with 2 additions and 2 deletions
|
@ -804,8 +804,8 @@ Builtins
|
|||
``f(*args)``.
|
||||
|
||||
* Removed :func:`callable`. Instead of ``callable(f)`` you can use
|
||||
``hasattr(f, '__call__')``. The :func:`operator.isCallable` function
|
||||
is also gone.
|
||||
``isinstance(f, collections.Callable)``. The :func:`operator.isCallable`
|
||||
function is also gone.
|
||||
|
||||
* Removed :func:`coerce`. This function no longer serves a purpose
|
||||
now that classic classes are gone.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue