[Python-checkins] r75214 - python/branches/py3k/Doc/whatsnew/3.0.rst

benjamin.peterson python-checkins at python.org
Sat Oct 3 17:13:16 CEST 2009


Author: benjamin.peterson
Date: Sat Oct  3 17:13:15 2009
New Revision: 75214

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

Modified:
   python/branches/py3k/Doc/whatsnew/3.0.rst

Modified: python/branches/py3k/Doc/whatsnew/3.0.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/3.0.rst	(original)
+++ python/branches/py3k/Doc/whatsnew/3.0.rst	Sat Oct  3 17:13:15 2009
@@ -804,8 +804,8 @@
   ``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.


More information about the Python-checkins mailing list