]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 75212,75214 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Sat, 3 Oct 2009 15:14:28 +0000 (15:14 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 3 Oct 2009 15:14:28 +0000 (15:14 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r75212 | benjamin.peterson | 2009-10-03 10:06:21 -0500 (Sat, 03 Oct 2009) | 1 line

  revert r75090
........
  r75214 | benjamin.peterson | 2009-10-03 10:13:15 -0500 (Sat, 03 Oct 2009) | 1 line

  isinstance(f, collections.Callable) is more correct
........

Doc/whatsnew/3.0.rst

index 2ba635ae4b15500cb8fcfa4269ebcc7680803a85..b79ce7f195fb47b2173540ddd2cd09bda01b4777 100644 (file)
@@ -804,8 +804,8 @@ Builtins
   ``f(*args)``.
 
 * Removed :func:`callable`.  Instead of ``callable(f)`` you can use
-  ``hasattr(type(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.