]> granicus.if.org Git - python/commitdiff
isinstance(f, collections.Callable) is more correct
authorBenjamin Peterson <benjamin@python.org>
Sat, 3 Oct 2009 15:13:15 +0000 (15:13 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 3 Oct 2009 15:13:15 +0000 (15:13 +0000)
Doc/whatsnew/3.0.rst

index 943457312f635eb6361741d8b0e7c377e73f3b2c..b79ce7f195fb47b2173540ddd2cd09bda01b4777 100644 (file)
@@ -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.