Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 36e0d0e

Browse files
committed
isinstance(f, collections.Callable) is more correct
1 parent 5850389 commit 36e0d0e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/whatsnew/3.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,8 +804,8 @@ Builtins
804804
``f(*args)``.
805805

806806
* Removed :func:`callable`. Instead of ``callable(f)`` you can use
807-
``hasattr(f, '__call__')``. The :func:`operator.isCallable` function
808-
is also gone.
807+
``isinstance(f, collections.Callable)``. The :func:`operator.isCallable`
808+
function is also gone.
809809

810810
* Removed :func:`coerce`. This function no longer serves a purpose
811811
now that classic classes are gone.

0 commit comments

Comments
 (0)