From: Benjamin Peterson Date: Sat, 3 Oct 2009 15:13:15 +0000 (+0000) Subject: isinstance(f, collections.Callable) is more correct X-Git-Tag: v3.2a1~2455 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36e0d0efd83ca1636be6d05ab1bed7d73fd84e83;p=python isinstance(f, collections.Callable) is more correct --- diff --git a/Doc/whatsnew/3.0.rst b/Doc/whatsnew/3.0.rst index 943457312f..b79ce7f195 100644 --- a/Doc/whatsnew/3.0.rst +++ b/Doc/whatsnew/3.0.rst @@ -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.