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

Skip to content

Commit 5770847

Browse files
committed
use more correct callable replacement
1 parent 75636af commit 5770847

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+
``hasattr(type(f), '__call__')``. The :func:`operator.isCallable` function is
808+
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)